报错信息
Field messageUtil in com.syn.service.Impl.UserServiceImpl required a bean of type 'com.syn.util.MessageUtil' 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.syn.util.MessageUtil' in your configuration.
原因:
在其他包下新建了bean类,但是SpringBoot项目的Application入口类未配置改包的扫描
解决方法:
方法一:把该类移到已经配置好的