spring boot项目,启动报这个异常
原因是:我通过@EnableTransactionManagement 启动了事务,但是没有开启cglib的动态代理。
application.properties增加如下配置
#aop
spring.aop.auto=true
spring.aop.proxy-target-class=true
依赖中增加:
org.springframework.boot
spring-boot-starter-aop