diff --git a/src/main/java/com/ruoyi/framework/config/SecurityConfig.java b/src/main/java/com/ruoyi/framework/config/SecurityConfig.java index b78ee04..1ceef04 100644 --- a/src/main/java/com/ruoyi/framework/config/SecurityConfig.java +++ b/src/main/java/com/ruoyi/framework/config/SecurityConfig.java @@ -100,12 +100,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter .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() diff --git a/src/main/java/com/ruoyi/project/system/controller/SysIndexController.java b/src/main/java/com/ruoyi/project/system/controller/SysIndexController.java new file mode 100644 index 0000000..0837663 --- /dev/null +++ b/src/main/java/com/ruoyi/project/system/controller/SysIndexController.java @@ -0,0 +1,29 @@ +package com.ruoyi.project.system.controller; + +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.utils.StringUtils; +import com.ruoyi.framework.config.RuoYiConfig; + +/** + * 首页 + * + * @author ruoyi + */ +@RestController +public class SysIndexController +{ + /** 系统基础配置 */ + @Autowired + private RuoYiConfig ruoyiConfig; + + /** + * 访问首页,提示语 + */ + @RequestMapping("/") + public String index() + { + return StringUtils.format("欢迎使用{}后台管理框架,当前版本:v{},请通过前端地址访问。", ruoyiConfig.getName(), ruoyiConfig.getVersion()); + } +}