springboot @Autowired 注入失败

Xy718 1,174 2019-10-29

记录一下这次的debug

今天下午在跑一个springboot程序时console一直报错:

Description:

Field XXX in com.XXX required a bean of type 'com.XXX' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.XXX' in your configuration.

这个项目呢在上一次我同学的commit之前还是可以正常启动的

是他在上传了新的service之后报的错

这是我负责的部分: 在注入了这个Service之后开始报错,后来排查了一下。。。。。 原因很简单。。。
就是粗心导致的

他负责的Service的实现类上忘记加 @Service 了


冶心·练体·得技