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配置無效的問題

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章