Consider defining a bean of type 'xxx' in your configuration.
在springboot项目中出现Consider defining a bean of type ‘xxx’ in your configuration.的原因,是因为无法识别相应的bean,无法完成注入。解决办法有:
1.检查实现类上是否添加@Service
2.实体类上是否添加@Component
3.在Dao接口上是否添加@Repository,@Mapper
4.检查相应的包路径是否一致