首页 > 其他 > 详细

@Autowired使用

时间:2019-05-22 14:49:55      阅读:163      评论:0      收藏:0      [点我收藏+]

报错:

Consider defining a bean of type ‘XXXXX‘ in your configuration.

因为在XxxxController.java中使用了:

@Autowired
private DeviceService deviceService;

需要在实现类DeviceServiceImpl上注释@Service("deviceService")

@Service("deviceService")
public class DeviceServiceImpl implements DeviceService {

}

@Autowired使用

原文:https://www.cnblogs.com/anenyang/p/10905511.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!