Springboot Maven 多模块项目中 @Service跨模块引用失败的问题

子模块中引用另一个子模块中的Service, @Autowired失败。

添加了模块之间的依赖没解决。

组以后在启动类上加上

@SpringBootApplication(scanBasePackages="com.exmaple")

解决了问题,参考:

https://blog.csdn.net/machuang30508/article/details/78616501

posted @ 2019-05-29 09:19  siashan  阅读(10396)  评论(0编辑  收藏  举报