springboot2 设置系统访问的默认首页

2020-12-03 08:44

阅读:615

标签:addview   figure   gis   首页   style   spring   control   configure   div   

 

@Configuration
public class WebMvcConfig implements WebMvcConfigurer{

    @Override
    public void addViewControllers(ViewControllerRegistry registry){
        //设置系统访问的默认首页
        registry.addViewController("/").setViewName("redirect:/app/login.html");
    }
}

备注:

(1)redirect可以改变浏览器地址;

(2)forward则不会改变浏览器地址。

springboot2 设置系统访问的默认首页

标签:addview   figure   gis   首页   style   spring   control   configure   div   

原文地址:https://www.cnblogs.com/yshyee/p/10987564.html

上一篇:使用 Java 发送邮件

下一篇:Java集合框架


评论


亲,登录后才可以留言!