0
点赞
收藏
分享

微信扫一扫

SpringBoot Cglib代理不生效

启动项目抛出异常: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>

  

 

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



举报

相关推荐

0 条评论