|
@@ -10,7 +10,7 @@ package cn.com.qmth.examcloud.app.core.config;
|
|
|
import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
|
|
-import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
|
|
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|
|
|
|
|
/**
|
|
|
* 请求拦截器
|
|
@@ -19,7 +19,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter
|
|
|
* @since: 2018/7/16
|
|
|
*/
|
|
|
@Configuration
|
|
|
-public class InterceptorConfig extends WebMvcConfigurerAdapter {
|
|
|
+public class InterceptorConfig implements WebMvcConfigurer {
|
|
|
|
|
|
@Bean
|
|
|
public AccessInterceptor accessInterceptor() {
|
|
@@ -31,7 +31,7 @@ public class InterceptorConfig extends WebMvcConfigurerAdapter {
|
|
|
// 拦截器PathPatterns通配符为两个"*"
|
|
|
registry.addInterceptor(accessInterceptor())
|
|
|
.addPathPatterns("/api/**")
|
|
|
- .excludePathPatterns("/", "/swagger-resources", "/api/app-api/device/record/list");
|
|
|
+ .excludePathPatterns("/", "/swagger-resources", "/api/app-api/device/record/list", "**.js", "**.css");
|
|
|
}
|
|
|
|
|
|
}
|