From bf9f5d506d34cbbcc68f77cdf71e30a6cf3cd7d4 Mon Sep 17 00:00:00 2001
From: 13693261870 <252740454@qq.com>
Date: 星期三, 09 八月 2023 13:50:07 +0800
Subject: [PATCH] 1

---
 src/main/java/com/lf/server/config/WebConfig.java |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/lf/server/config/WebConfig.java b/src/main/java/com/lf/server/config/WebConfig.java
index 263224b..3d11745 100644
--- a/src/main/java/com/lf/server/config/WebConfig.java
+++ b/src/main/java/com/lf/server/config/WebConfig.java
@@ -4,9 +4,10 @@
 import com.alibaba.fastjson.support.config.FastJsonConfig;
 import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
 import com.lf.server.interceptor.AuthInterceptor;
-import com.lf.server.service.sys.TokenService;
+import com.lf.server.service.all.SysService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.context.annotation.Configuration;
+import org.springframework.core.Ordered;
 import org.springframework.http.converter.HttpMessageConverter;
 import org.springframework.util.AntPathMatcher;
 import org.springframework.web.servlet.config.annotation.*;
@@ -21,7 +22,15 @@
 @Configuration
 public class WebConfig extends WebMvcConfigurationSupport {
     @Autowired
-    private TokenService tokenService;
+    private SysService sysService;
+
+    @Override
+    public void addViewControllers(ViewControllerRegistry registry) {
+        // 璁剧疆璁块棶璺緞涓� 鈥�/鈥� 璺宠浆鍒版寚瀹氶〉闈�
+        registry.addViewController("/").setViewName("redirect:/sign/toIndex");
+        // 璁剧疆涓烘渶楂樹紭鍏堢骇
+        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
+    }
 
     /**
      * 鑾峰彇鎷︽埅鍣ㄥ璞�
@@ -29,7 +38,7 @@
      * @return
      */
     public AuthInterceptor getAuthBean() {
-        return new AuthInterceptor(tokenService);
+        return new AuthInterceptor(sysService);
     }
 
     /**

--
Gitblit v1.9.3