增加此配置后,就不需要在controller中手动写路径到视图的映射了
@Configuration
public class GulimallWebConfig implements WebMvcConfigurer {
@Override
public void addViewControllers(ViewControllerRegistry registry) {
registry.addViewController("index.html").setViewName("index");
registry.addViewController("reg.html").setViewName("reg");
}
}



