@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
viewResolver.setViewClass(JstlView.class);
viewResolver.setPrefix("/WEB-INF/views/");
viewResolver.setSuffix(".jsp");
registry.viewResolver(viewResolver);
}
我更改了viewResolver.setSuffix(" .html");现在我收到404错误。
答案 0 :(得分:0)
我认为问题是viewResolver.setViewClass(JstlView.class);
。尝试将其删除并再次测试。