问题描述
项目启动报错:
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'orderRelationIpDocumentMapper' could not be injected as a 'com.cqts.manage.dao.dm.ext.xx' because it is a JDK dynamic proxy that implements:
com.cqts.manage.dao.dm.xxx
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 @EnableCaching.
解决办法
导致原因:多半是使用@Resource注解导致的问题,因为@Autowired默认按类型装配,而 @Resource优先按名称装配,如果使用
@Resource private XabYcdService ycdSerivce;
恰巧有另外一个bean叫“ycdSerivce” 也可能出现这个错误。
所以,找到具体的类,然后查看引用名称解决。
原创文章,作者:1402239773,如若转载,请注明出处:https://blog.ytso.com/243819.html