写了一个aspect用于拦截日志并记录到数据库,注入了一个LogSvc用于写日志到数据库,只要在logsvc
的writeLog()方法加了@Transaction注解,启动就会报错“the bean 'logSvc' could not be injected as a 'com.erong.acct.batch.service.generalsvc.LogSvc' because it is a JDK dynamic proxy that implements:
Action:
Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on @EnableAsync and/or @EnableC
aching.”
在bootstrap.yml开启“ proxy-target-class: true”也没用,求大神指导!!!