默认访问首页新增提示语
This commit is contained in:
		
							parent
							
								
									1bfa14e3c6
								
							
						
					
					
						commit
						c02dad2ca3
					
				| 
						 | 
					@ -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());
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -100,12 +100,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
 | 
				
			||||||
                .antMatchers("/login", "/captchaImage").anonymous()
 | 
					                .antMatchers("/login", "/captchaImage").anonymous()
 | 
				
			||||||
                .antMatchers(
 | 
					                .antMatchers(
 | 
				
			||||||
                        HttpMethod.GET,
 | 
					                        HttpMethod.GET,
 | 
				
			||||||
 | 
					                        "/",
 | 
				
			||||||
                        "/*.html",
 | 
					                        "/*.html",
 | 
				
			||||||
                        "/**/*.html",
 | 
					                        "/**/*.html",
 | 
				
			||||||
                        "/**/*.css",
 | 
					                        "/**/*.css",
 | 
				
			||||||
                        "/**/*.js"
 | 
					                        "/**/*.js",
 | 
				
			||||||
 | 
					                        "/profile/**"
 | 
				
			||||||
                ).permitAll()
 | 
					                ).permitAll()
 | 
				
			||||||
                .antMatchers("/profile/**").anonymous()
 | 
					 | 
				
			||||||
                .antMatchers("/common/download**").anonymous()
 | 
					                .antMatchers("/common/download**").anonymous()
 | 
				
			||||||
                .antMatchers("/common/download/resource**").anonymous()
 | 
					                .antMatchers("/common/download/resource**").anonymous()
 | 
				
			||||||
                .antMatchers("/swagger-ui.html").anonymous()
 | 
					                .antMatchers("/swagger-ui.html").anonymous()
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue