
Consider defining a bean of type ‘com.nclg.mall.service.AdminService‘ in your configuration.
问题描述
使用spring boot分模块开发时启动application出现错误
Consider defining a bean of type 'com.nclg.mall.service.AdminService' in your configuration. 原因spring boot默认只扫描application启动器所在的包及其子包,分模块的包不在同一个包下
解决指定spring boot应该扫描哪些包
@SpringBootApplication(scanBasePackages = {"com.nclg.mall.api", "com.nclg.mall.db","com.nclg.mall.service"})👁️ 阅读量:0
© 版权声明:本文《Consider defining a bean of type ‘com.nclg.mall.service.AdminService‘ in your configuration.》内容均为本站精心整理或网友自愿分享,如需转载请注明原文出处:https://www.zastudy.cn/wen/1686552789a290034.html。