Consider defining a bean of type 'com.baizhi.service.EmpService' in your configuration.

说来惭愧,我把@Service注解放到Service接口上了,导致项目启动的时候无法创建bean,只需要把@Service放到ServiceImpl实现类上就行了。

 

Description:

Field empService in com.baizhi.controller.EmpController required a bean of type 'com.baizhi.service.EmpService' 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.baizhi.service.EmpService' in your configuration.

posted @ 2021-08-06 17:20  sensen~||^_^|||&  阅读(218)  评论(0)    收藏  举报