配置似乎还不错,只是你应该使用
excludeFilters而不是
excludes:
@Configuration @EnableSpringConfigured@ComponentScan(basePackages = {"com.example"}, excludeFilters={ @ComponentScan.Filter(type=FilterType.ASSIGNABLE_TYPE, value=Foo.class)})public class MySpringConfiguration {}


