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标签

原文地址:https://www.cnblogs.com/wangxue1314/p/12678424.html