How to configure multiple view resolvers in spring4?

1.8k Views Asked by At

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.

1

There are 1 best solutions below

0
On BEST ANSWER