SpringBoot 无法注入 service 的 bean

错误信息

Description:

Field areaService in com.imooc.demo.web.AreaController required a bean of type 'com.imooc.demo.service.AreaService' 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.imooc.demo.service.AreaService' in your configuration.

 

操作

 

 在实现类中加入@Service标签

posted @ 2020-04-11 11:31  程程111  阅读(1242)  评论(1编辑  收藏  举报