SpringBoot配置扫描其他的包
因为多模块中其他配置模块也需要spring组件功能,所以发布模块需要加载其他模块的内容
-
扫描代码
@SpringBootApplication
@ComponentScan(basePackages = {"cn.itxm.common","cn.itxm.mapper"})
public class Main {
public static void main(String[] args) {
SpringApplication.run(Main.class, args);
}
}
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/tech/pnotes/16272.html