当我@Transactional(readOnly=false)在我的Service类中添加" "注释时,我收到以下错误
描述:
bean"studentService"无法作为'
com.student.service.StudentServiceImpl' 注入,因为它是一个实现的JDK动态代理:com.student.service.StudentService
示例代码:
@Service("studentService")
@Transactional(readOnly=false)
public class StudentServiceImpl implements StudentService {
}
public interface StudentService {
}
Run Code Online (Sandbox Code Playgroud)
行动:
考虑将bean注入其接口之一或通过设置
proxyTargetClass=trueon@EnableAsync和/或强制使用基于CGLib的代理@EnableCaching.进程以退出代码1结束
是什么造成的?