// @Bean public InternalResourceViewResolver viewResolver1() { InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setViewClass(JstlView.class); viewResolver.setPrefix("/WEB-INF/views/"); viewResolver.setSuffix(".jsp"); return viewResolver; }
static ViewResolver viewResolver() { InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setViewClass(JstlView.class); viewResolver.setPrefix(PATH__PREFIX); viewResolver.setSuffix(PATH__SUFFIX); return viewResolver; }
@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); }
@Bean public ViewResolver viewResolver() { InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setViewClass(JstlView.class); viewResolver.setPrefix(JSP_FILE_PATH); viewResolver.setSuffix(JSP_FILE_SUFFIX); return viewResolver; }
/** Creates a <code>ViewResolver</code> instance that can match a view name to an actual view. */ @Bean public ViewResolver viewResolver() { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setViewClass(JstlView.class); resolver.setPrefix("/WEB-INF/jsp/view/"); resolver.setSuffix(".jsp"); return resolver; }
@Bean public InternalResourceViewResolver jspViewResolver() { InternalResourceViewResolver bean = new InternalResourceViewResolver(); bean.setViewClass(JstlView.class); bean.setPrefix("/WEB-INF/views/"); bean.setSuffix(".jsp"); return bean; }
@Bean public ViewResolver viewResolver() { InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setViewClass(JstlView.class); viewResolver.setPrefix(VIEW_RESOLVER_PREFIX); viewResolver.setSuffix(VIEW_RESOLVER_SUFFIX); return viewResolver; }
// а этот бин инициализирует View нашего проекта // точно это же мы делали в mvc-dispatcher-servlet.xml @Bean public InternalResourceViewResolver setupViewResolver() { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix("/pages/"); resolver.setSuffix(".jsp"); resolver.setViewClass(JstlView.class); return resolver; }
@Bean public ViewResolver viewResolver() { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setViewClass(JstlView.class); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); resolver.setExposeContextBeansAsAttributes(true); return resolver; }
@Bean public InternalResourceViewResolver internalResourceViewResolver() { final InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); resolver.setOrder(2); resolver.setViewClass(BaseView.class); resolver.setExposedContextBeanNames(new String[] {"props"}); return resolver; }
@Bean public InternalResourceViewResolver internalResourceViewResolver() { InternalResourceViewResolver jspResolver = new InternalResourceViewResolver(); jspResolver.setViewClass(JstlView.class); jspResolver.setViewNames(new String[] {"jsp/*"}); jspResolver.setPrefix("/WEB-INF/views/"); jspResolver.setSuffix(".jsp"); jspResolver.setOrder(1); return jspResolver; }
@Bean public ViewResolver viewResolver(ContentNegotiationManagerFactoryBean contentManager) { InternalResourceViewResolver resolver = new InternalResourceViewResolver(); resolver.setPrefix("/WEB-INF/views/"); resolver.setSuffix(".jsp"); resolver.setExposeContextBeansAsAttributes(true); resolver.setViewClass(JstlView.class); // TilesViewResolver resolver = new TilesViewResolver(); // priority: file extension->Accept header // ContentNegotiatingViewResolver resolver = new ContentNegotiatingViewResolver(); // resolver.setContentNegotiationManager(contentManager.getObject()); return resolver; }