Browse Source

修改---退出登录后,跳转的地址。

zhouhaijun 2 months ago
parent
commit
f29f4562d1

+ 9 - 1
src/main/java/com/bootdo/system/controller/LoginController.java

@@ -45,9 +45,14 @@ public class LoginController extends BaseController {
     @Value("${sysCity:#{null}}")
     public String sysCity;
 
+    //登录地址
     @Value("${login.url:#{null}}")
     public String loginUrl;
 
+    //退出登录后的跳转地址
+    @Value("${logout.url:#{null}}")
+    public String logoutUrl;
+
     @Autowired
     private SessionService sessionService;
 
@@ -203,7 +208,10 @@ public class LoginController extends BaseController {
         } catch (Exception e){
             e.printStackTrace();
         }
-        return "redirect:/login";
+        //return "redirect:/login";
+
+        //添加退出登录后的跳转地址
+        return "redirect:" + logoutUrl;
     }
 
     @GetMapping("/main")

+ 4 - 0
src/main/resources/application-dev.yml

@@ -78,6 +78,10 @@ api-allow-ip: 127.0.0.1
 #登录页地址
 login.url: http://127.0.0.1:19087/login
 
+#退出登录的跳转地址
+logout:
+  url: /login
+
 #短信网关
 message_gateway:
   prefix: http://testmicrosrv.scca.com.cn:9527

+ 4 - 1
src/main/resources/application-prod.yml

@@ -90,7 +90,10 @@ api-allow-ip: 127.0.0.1,172.18.105.10,172.18.105.11,218.89.240.185
 
 #登录页地址
 login.url: http://218.89.240.185:19087/login
-#login.url: http://172.18.105.20:8080/
+
+#退出登录的跳转地址
+logout:
+  url: http://172.18.105.20:8080/
 
 #短信网关
 message_gateway:

+ 6 - 1
src/main/resources/application-test.yml

@@ -76,7 +76,12 @@ spring:
 api-allow-ip: 127.0.0.1,124.70.58.209
 
 #登录页地址
-login.url: http://124.70.58.209:19087/login
+login:
+  url: http://124.70.58.209:19087/login
+
+#退出登录的跳转地址
+logout:
+  url: /login
 
 #短信网关
 message_gateway:

+ 2 - 2
src/main/resources/application.yml

@@ -21,9 +21,9 @@ spring:
 #    开发环境
 #  active: dev
 #    测试环境
-   active: test
+#   active: test
 #    #生产环境
-#    active: prod
+    active: prod
   servlet:
     multipart:
       max-file-size: 30Mb