600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > 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:

时间:2020-08-03 20:50:54

相关推荐

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代理,那就或出现上述问题,只需要将名字改成不同的就可以了

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。