@Bean public ViewResolver contentNegotiatingViewResolver( ContentNegotiationManager manager) { List< ViewResolver > resolvers = new ArrayList<ViewResolver>(); UrlBasedViewResolver viewResolver = new UrlBasedViewResolver(); viewResolver.setViewClass(TilesView.class); resolvers.add(viewResolver); JsonViewResolver r2 = new JsonViewResolver(); resolvers.add(r2); ContentNegotiatingViewResolver resolver = new ContentNegotiatingViewResolver(); resolver.setViewResolvers(resolvers); resolver.setContentNegotiationManager(manager); return resolver; }
@Bean public UrlBasedViewResolver springfieldWebmvcRenderTilesView()throws Exception{ UrlBasedViewResolver bean = new UrlBasedViewResolver(); bean.setViewClass(TilesView.class); bean.setOrder(Ordered.LOWEST_PRECEDENCE); return bean; }
@Bean public UrlBasedViewResolver springfieldTilesView()throws Exception{ UrlBasedViewResolver bean = new UrlBasedViewResolver(); bean.setViewClass(TilesView.class); bean.setOrder(Ordered.LOWEST_PRECEDENCE); return bean; }