0
点赞
收藏
分享

微信扫一扫

springboot @ComponentScan 注解不支持扫描jar包中组件解决办法

书写经典 2022-05-27 阅读 41

@ComponentScan(basePackages={"com.xx.common.core.config.mq"})
public class ProductApplication {
public static void main(String[] args) {
SpringApplication.run(ProductApplication.class, args);
}

}

 

在Application上增加 @ComponentScan(basePackages={"com.xx.common.core.config.mq"})

即可访问lib中@Configuration


举报

相关推荐

0 条评论