拦截器配置了不生效: 可能是拦截器类上没加@Component,或者配置类上没加@Configuration有多个类继承或实现了WebMvcConfigurationSupport、WebMvcConfiguration,springboot只会执行其中一个配置类,应该把多个写到一起。