问题原因:当前boot程序引用第三方jar,同时jar中使用@Component自动创建,在启动程序中同时加入@SpringBootApplication和@ComponentScan出现
Redundant declaration:@SpringBootApplication already applies given @ComponentScan
原因是因为@SpringBootApplication 中已经包含了 @ComponentScan
为了解决该问题,需要使用@ComponentScans已
@ComponentScans({@ComponentScan("com.xxx.xx")})方式程序正常运行