
Spring Boot 报错:Consider defining a bean of type ‘com.UserService‘ in your configuration.
Consider defining a bean of type ‘com.moshang.msmall.service.UserService’ in your configuration.
其实是启动类没有扫描到报错这个文件
在启动类前加上注解
@MapperScan("com.moshang.msmall.dao") @SpringBootApplication(scanBasePackages ="com.moshang")👁️ 阅读量:0
© 版权声明:本文《Spring Boot 报错:Consider defining a bean of type ‘com.UserService‘ in your configuration.》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686556899a291273.html。