Spring Boot 默认首页

   //继承  WebMvcConfigurerAdapter
  @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("forward:/homeV/index.html");
        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
        super.addViewControllers(registry);
    }

 

posted @ 2018-04-10 15:25  ^梦幻星空^  阅读(251)  评论(0编辑  收藏  举报