首页 > 其他分享 >SpringBoot Cglib代理不生效

SpringBoot Cglib代理不生效

时间:2023-03-07 11:32:43浏览次数:36  
标签:SpringBoot type 生效 boot springframework Cglib aop org com

启动项目抛出异常:Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'testTableDao' is expected to be of type 'com.TestTableDao' but was actually of type 'com.sun.proxy.$Proxy92'

 

原因:缺少Cglib依赖

解决办法:添加aop依赖

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>

  

 

你投入得越多,就能得到越多得价值



标签:SpringBoot,type,生效,boot,springframework,Cglib,aop,org,com
From: https://blog.51cto.com/u_15307418/6105656

相关文章