Description:
Field demoService in com.demo.controller.DemoController required a bean of type 'com.demo.service.DemoService' 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.demo.service.DemoService' in your configuration.
原因是demoService 自动注入时找不到DemoService类型的bean。
解决办法:在DemoService的实现类加入@Service注解即可