xuefei
2020-12-22 4745238280ae22f373802470844c66cbcdbf4458
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package cn.cetc54.platform.core.config;
 
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
 
/**
 * @author xfei
 * @date 2020/12/13
 */
public class IndexHtmlConfig extends WebMvcConfigurerAdapter {
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/").setViewName("index");
        registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
        super.addViewControllers(registry);
    }
}