@SpringBootApplication
@ComponentScan(excludeFilters =
{
@ComponentScan.Filter(type = FilterType.REGEX,pattern = "com.action.other.*")
})
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
根据FilterType不同有不同的过滤方式,这里是根据正则过滤