Java Code Examples for org.springframework.web.servlet.config.annotation.ViewResolverRegistry#viewResolver()
The following examples show how to use
org.springframework.web.servlet.config.annotation.ViewResolverRegistry#viewResolver() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZkWebMvcConfiguration.java From zkspringboot with Apache License 2.0 | 6 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { if(zkProperties.isZulViewResolverEnabled()) { final String springbootPackaging = zkProperties.getSpringbootPackaging(); String prefix; if(zkProperties.isWar()) { prefix = zkProperties.getZulViewResolverPrefix() + "/"; } else { prefix = zkProperties.getUpdateUri() + ClassWebResource.PATH_PREFIX + zkProperties.getZulViewResolverPrefix() + "/"; } final String suffix = zkProperties.getZulViewResolverSuffix(); logger.info("ZK-Springboot: InternalViewResolver enabled - e.g. resolving view 'example' to '{}example{}'", prefix, suffix); InternalResourceViewResolver resolver = new InternalResourceViewResolver(prefix, suffix); resolver.setOrder(InternalResourceViewResolver.LOWEST_PRECEDENCE); registry.viewResolver(resolver); } }
Example 2
Source File: WebMvcAutoConfiguration.java From halo with GNU General Public License v3.0 | 5 votes |
/** * Configuring view resolver * * @param registry registry */ @Override public void configureViewResolvers(ViewResolverRegistry registry) { FreeMarkerViewResolver resolver = new FreeMarkerViewResolver(); resolver.setAllowRequestOverride(false); resolver.setCache(false); resolver.setExposeRequestAttributes(false); resolver.setExposeSessionAttributes(false); resolver.setExposeSpringMacroHelpers(true); resolver.setSuffix(HaloConst.SUFFIX_FTL); resolver.setContentType("text/html; charset=UTF-8"); registry.viewResolver(resolver); }
Example 3
Source File: MVCConfiguration.java From seed with Apache License 2.0 | 5 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { InternalResourceViewResolver irvr = new InternalResourceViewResolver(); irvr.setPrefix("/WEB-INF/jsp/"); irvr.setSuffix(".jsp"); irvr.setViewClass(JstlView.class); registry.viewResolver(irvr); }
Example 4
Source File: ApplicationConfigAdapter.java From Agent-Benchmarks with Apache License 2.0 | 5 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { super.configureViewResolvers(registry); InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/pages/"); viewResolver.setSuffix(".jsp"); registry.viewResolver(viewResolver); }
Example 5
Source File: ApplicationConfigAdapter.java From Agent-Benchmarks with Apache License 2.0 | 5 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { super.configureViewResolvers(registry); InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/pages/"); viewResolver.setSuffix(".jsp"); registry.viewResolver(viewResolver); }
Example 6
Source File: ApplicationConfigAdapter.java From Agent-Benchmarks with Apache License 2.0 | 5 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { super.configureViewResolvers(registry); InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/pages/"); viewResolver.setSuffix(".jsp"); registry.viewResolver(viewResolver); }
Example 7
Source File: ApplicationConfigAdapter.java From Agent-Benchmarks with Apache License 2.0 | 5 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { super.configureViewResolvers(registry); InternalResourceViewResolver viewResolver = new InternalResourceViewResolver(); viewResolver.setPrefix("/pages/"); viewResolver.setSuffix(".jsp"); registry.viewResolver(viewResolver); }
Example 8
Source File: TilesApplicationConfiguration.java From tutorials with MIT License | 4 votes |
/** * Configure ViewResolvers to deliver views. */ @Override public void configureViewResolvers(ViewResolverRegistry registry) { TilesViewResolver viewResolver = new TilesViewResolver(); registry.viewResolver(viewResolver); }
Example 9
Source File: WebConfig.java From spring4-sandbox with Apache License 2.0 | 4 votes |
@Override public void configureViewResolvers(ViewResolverRegistry registry) { registry .viewResolver(viewResolver()); }