@SpringBootApplication和@ComponentScan一起使用报错
问题原因:当前boot程序引用第三方jar,同时jar中使用@Component自动创建,在启动程序中同时加入@SpringBootApplication和@ComponentScan出现Redundant declaration:@SpringBootApplication already applies given @ComponentScan原因是因为@SpringBootApplication 中已经包含了@ComponentScan为了解决该问题,需要使用@ComponentSca..
原创
2021-12-08 11:27:03 ·
2173 阅读 ·
0 评论