实现WebMvcConfigurer这个接口
@Configuration
public class myMvcConfig implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("/").setViewName("login");
registry.addViewController("/main.html").setViewName("dashboard");
---------------------
作者:WilsonSong1024
来源:CSDN
原文:https://blog.csdn.net/WilsonSong1024/article/details/80176285
版权声明:本文为博主原创文章,转载请附上博文链接!