Answer the question
In order to leave comments, you need to log in
How to configure display of html pages instead of jsp in Spring'e (annotations)?
I tried to configure the display of html pages through the ViewResolver, but it shows that it does not find mapping.
@EnableWebMvc
@Configuration
@ComponentScan(basePackages = "controller")
public class WebConfig implements WebMvcConfigurer {
@Bean
public ViewResolver jspViewResolver() {
InternalResourceViewResolver viewResolver =
new InternalResourceViewResolver();
viewResolver.setPrefix("/WEB-INF/views/");
viewResolver.setSuffix(".html");
viewResolver.setOrder(1);
return viewResolver;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question