The bean 'XXXservice' could not be injected as a 'XXXservice' because it is a JDK dynamic proxy that implements:
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注解,他是按照名称设置的,就是你对应的属性小写,你要保证每个地方注入的都是按照名称注入的,名称相同,才行,不然就会有这个错,比如说:
@Resource
DeviceUserHelper deviceUserMapper;
@Resource
DeviceUserHelper deviceUserMapper;
这样就不行,在通过的类中,两个不同的interface,名称注入相同也不行,必须属性唯一。不然你就按照@Autowired这个是按照类型注入的,可以名字不同