SpringBoot 正则表达式排除包扫描

// com.jiaobuchong.business 和 com.jiaobuchong.user.servic 下的类都不会被扫描
@ComponentScan(basePackages = {
    
    "com.jiaobuchong.order.service"},
        excludeFilters = {
    
    @ComponentScan.Filter(type = FilterType.REGEX,
                pattern = "com.jiaobuchong.business\\..*"),
                @ComponentScan.Filter(type = FilterType.REGEX, pattern = "com.jiaobuchong.user.service\\..*")})

Spring Boot应用中@CompentScan excludeFilters配置无效的问题

猜你喜欢

转载自blog.csdn.net/jiaobuchong/article/details/104606356