From 8d6b17bfa56fd767c6f9de666eb0dd44c6b032cd Mon Sep 17 00:00:00 2001
From: 廖井涛 <2265517004@qq.com>
Date: 星期四, 22 五月 2025 15:42:38 +0800
Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
---
north-glass-erp/src/main/java/com/example/erp/config/InterceptorConfig.java | 30 ++++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/north-glass-erp/src/main/java/com/example/erp/config/InterceptorConfig.java b/north-glass-erp/src/main/java/com/example/erp/config/InterceptorConfig.java
new file mode 100644
index 0000000..bf86a10
--- /dev/null
+++ b/north-glass-erp/src/main/java/com/example/erp/config/InterceptorConfig.java
@@ -0,0 +1,30 @@
+package com.example.erp.config;
+
+import com.example.erp.common.interceptor.JwtInterceptor;
+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;
+
+import javax.annotation.Resource;
+
+@Configuration
+
+public class InterceptorConfig implements WebMvcConfigurer {
+ @Resource
+ private JwtInterceptor jwtInterceptor;
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ registry.addInterceptor(jwtInterceptor)
+ .addPathPatterns("/**")
+ .excludePathPatterns("/user/login",
+ "/user/register",
+ "/swagger-resources/**"
+ ,"/webjars/**"
+ ,"/v2/**"
+ ,"/swagger-ui.html/**"
+ ,"/swagger-ui.html#/**");
+ }
+
+
+}
--
Gitblit v1.8.0