原文地址:https://blog.csdn.net/liuyueyi25/article/details/83280239
@SpringBootApplication @ComponentScan(excludeFilters = {@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = SameA.class)}) public class Application { public static void main(String[] args) { SpringApplication.run(Application.class, args); } }