67,513
社区成员
发帖
与我相关
我的任务
分享
@Configuration
@ComponentScan(
useDefaultFilters = false,
includeFilters = {
@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Controller.class),
@ComponentScan.Filter(type = FilterType.ANNOTATION, value = ControllerAdvice.class),
@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Service.class),
@ComponentScan.Filter(type = FilterType.ANNOTATION, value = Repository.class),
// @ComponentScan.Filter(type = FilterType.ANNOTATION, value = Configuration.class)加入此配置RedisCacheCofig 才能被加载进来
},
basePackages = {
"com.xxx.cache",
"com.xxx.mall.controller",
"com.xxx.api"
})
@EnableAspectJAutoProxy(proxyTargetClass = true)
public class WebMvcConfig extends WebMvcConfigurerAdapter {