|
@@ -10,10 +10,10 @@ package cn.com.qmth.examcloud.app.config;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Bean;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
|
|
|
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
@Configuration
|
|
@Configuration
|
|
-public class InterceptorConfig extends WebMvcConfigurerAdapter {
|
|
|
|
|
|
+public class InterceptorConfig implements WebMvcConfigurer {
|
|
|
|
|
|
@Bean
|
|
@Bean
|
|
public AccessInterceptor accessInterceptor() {
|
|
public AccessInterceptor accessInterceptor() {
|
|
@@ -25,7 +25,6 @@ public class InterceptorConfig extends WebMvcConfigurerAdapter {
|
|
registry.addInterceptor(accessInterceptor())
|
|
registry.addInterceptor(accessInterceptor())
|
|
.addPathPatterns("/api/**")
|
|
.addPathPatterns("/api/**")
|
|
.excludePathPatterns("/", "/swagger-resources");
|
|
.excludePathPatterns("/", "/swagger-resources");
|
|
- super.addInterceptors(registry);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|