📜  默认页面 +load +onstartup +springboot - 任何代码示例

📅  最后修改于: 2022-03-11 14:56:17.260000             🧑  作者: Mango

代码示例2
@Configuration
public class DefaultView extends WebMvcConfigurerAdapter{

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