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>
你投入得越多,就能得到越多得价值