From c02dad2ca3830eafe476c7fa96724ec267cb82e5 Mon Sep 17 00:00:00 2001 From: RuoYi <yzz_ivy@163.com> Date: 星期日, 11 七月 2021 15:28:11 +0800 Subject: [PATCH] 默认访问首页新增提示语 --- ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java | 5 +++-- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java | 29 +++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java new file mode 100644 index 0000000..9a5cb97 --- /dev/null +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java @@ -0,0 +1,29 @@ +package com.ruoyi.web.controller.system; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.ruoyi.common.config.RuoYiConfig; +import com.ruoyi.common.utils.StringUtils; + +/** + * 棣栭〉 + * + * @author ruoyi + */ +@RestController +public class SysIndexController +{ + /** 绯荤粺鍩虹閰嶇疆 */ + @Autowired + private RuoYiConfig ruoyiConfig; + + /** + * 璁块棶棣栭〉锛屾彁绀鸿 + */ + @RequestMapping("/") + public String index() + { + return StringUtils.format("娆㈣繋浣跨敤RuoYi鍚庡彴绠$悊妗嗘灦锛屽綋鍓嶇増鏈細v{}", ruoyiConfig.getVersion()); + } +} diff --git a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index 7866115..30718c3 100644 --- a/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -100,12 +100,13 @@ .antMatchers("/login", "/captchaImage").anonymous() .antMatchers( HttpMethod.GET, + "/", "/*.html", "/**/*.html", "/**/*.css", - "/**/*.js" + "/**/*.js", + "/profile/**" ).permitAll() - .antMatchers("/profile/**").anonymous() .antMatchers("/common/download**").anonymous() .antMatchers("/common/download/resource**").anonymous() .antMatchers("/swagger-ui.html").anonymous() -- Gitblit v1.9.3