package com.rongpan.config;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@Configuration
public class WebConfigurer implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
//默认地址(可以是页面或后台请求接口)
registry.addViewController(“/”).setViewName(“forward:/upload.html”);
//设置过滤优先级最高
registry.setOrder(Ordered.HIGHEST_PRECEDENCE);
}
}
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
暂无评论内容