
SpringCloud启动项目报错:Consider defining a bean of type 'com.XXX.XXX.dao.UserDao' in your confi
1.报错信息为:
Description:
Field userDao in com.XXX.XXX.service.impl.UserServiceImpl required a bean of type 'com.XXX.XXX.dao.UserDao' 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.XXX.XXX.dao.UserDao' in your configuration.
Process finished with exit code 1
2.在启动类上加:
@ComponentScan(basePackages = {"com.XXX.XXX.dao"})
👁️ 阅读量:0
© 版权声明:本文《SpringCloud启动项目报错:Consider defining a bean of type 'com.XXX.XXX.dao.UserDao' in your confi》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686550126a289262.html。