@Autowired使用

时间:2019-05-22 14:49:55   收藏:0   阅读:164

报错:

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 {

}

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

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!