The bean ‘xxx‘ could not be injected as a ‘xxx‘ because it is a JDK dynamic proxy that implements:

The bean ‘xxx‘ could not be injected as a ‘xxx‘ because it is a JDK dynamic proxy that implements:

问题: The bean ‘xxx‘ could not be injected as a ‘xxx‘ because it is a JDK dynamic proxy that implements:

这里说一种比较特殊的情况
很多网友在加了proxy-target-class = true 后依然报错,
这里需要排查是否有相同的变量类名,因为这里报的是注入错误

比如两个servie接口
A 类 {
private XXServiceImpl xxServiceImpl ;
@Autowired
private SystemUserMapper userMapper;
}

B 类 {
private XXServiceImpl xxServiceImpl ;
@Autowired
private WebUserMapper userMapper;
}
如果这两个SystemUserMapper ,WebUserMapper 恰好使用了mybaits-plus代理,那就或出现上述问题,只需要将名字改成不同的就可以了

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值