How to configure multiple view resolvers in spring4 in order to prevent a conflict between them? As for example:
@Bean
public ViewResolver viewResolver() {
InternalResourceViewResolver resolver = new InternalResourceViewResolver();
resolver.setPrefix("/WEB-INF/views/");
resolver.setSuffix(".jsp");
resolver.setExposeContextBeansAsAttributes(true);
return resolver;
}
@Bean
public ViewResolver viewResolver() {
return new TilesViewResolver();
}
There are explanations for xml-configuration on the Internet, but I haven't seen any for spring4 java-configuration.
Here is the link which you can use:
https://blog.frankel.ch/chaining-url-view-resolvers-in-spring-mvc/#gsc.tab=0