问题描述

项目启动报错:
***************************
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” 也可能出现这个错误。
所以,找到具体的类,然后查看引用名称解决。
版权所有 © 【代码谷】 欢迎非商用转载,转载请按下面格式注明出处,商业转载请联系授权,违者必究。(提示:点击下方内容复制出处)
源文:《because it is a JDK dynamic proxy that implements: xxx》,链接:https://www.daimagu.com/article/819.html,来源:【代码谷】
评论