RuoYi
2021-07-11 c02dad2ca3830eafe476c7fa96724ec267cb82e5
默认访问首页新增提示语
1 files modified
1 files added
34 ■■■■■ changed files
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java 29 ●●●●● patch | view | raw | blame | history
ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java 5 ●●●●● patch | view | raw | blame | history
ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysIndexController.java
New file
@@ -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());
    }
}
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()