|
@@ -1,26 +1,26 @@
|
|
-//package com.huimv.env.admin.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.WebMvcConfigurer;
|
|
|
|
-//
|
|
|
|
-///**
|
|
|
|
-// * @Description: 注册验证tocken的拦截器
|
|
|
|
-// * @Author
|
|
|
|
-// * @Date 2021/4/19 20:41
|
|
|
|
-// * @Version V1.0
|
|
|
|
-// */
|
|
|
|
-//@Configuration
|
|
|
|
-//public class InterceptorConfig implements WebMvcConfigurer {
|
|
|
|
-// @Bean
|
|
|
|
-// public JWTInterceptor jwtInterceptor(){
|
|
|
|
-// return new JWTInterceptor();
|
|
|
|
-// }
|
|
|
|
-//
|
|
|
|
-// @Override
|
|
|
|
-// public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
-// registry.addInterceptor(jwtInterceptor()).
|
|
|
|
-// excludePathPatterns("/smarteleApi/admin/my/*");
|
|
|
|
-// }
|
|
|
|
-//}
|
|
|
|
|
|
+package com.huimv.env.admin.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.WebMvcConfigurer;
|
|
|
|
+
|
|
|
|
+/**
|
|
|
|
+ * @Description: 注册验证tocken的拦截器
|
|
|
|
+ * @Author
|
|
|
|
+ * @Date 2021/4/19 20:41
|
|
|
|
+ * @Version V1.0
|
|
|
|
+ */
|
|
|
|
+@Configuration
|
|
|
|
+public class InterceptorConfig implements WebMvcConfigurer {
|
|
|
|
+ @Bean
|
|
|
|
+ public JWTInterceptor jwtInterceptor(){
|
|
|
|
+ return new JWTInterceptor();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public void addInterceptors(InterceptorRegistry registry) {
|
|
|
|
+ registry.addInterceptor(jwtInterceptor()).
|
|
|
|
+ excludePathPatterns("/admin/my/*");
|
|
|
|
+ }
|
|
|
|
+}
|