springboot排除扫描包


@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不同有不同的过滤方式,这里是根据正则过滤

你可能感兴趣的:(springboot排除扫描包)