使用springboot做事务管理时,出现异常:The bean 'xxx' could not be injected as a 'xx.xxx' because it is a JDK dynamic proxy that implements:
搞了半天发现是代理的原因:
在SpringBoot的启动类上加上
@EnableTransactionManagement(proxyTargetClass = true)
注解时,需要开启代理
proxyTargetClass = true
之前报错是因为我只加了注解而没有开启代理:
@EnableTransactionManagement