org.springframework.web.servlet.config.annotation.ViewResolverRegistry Java Examples

The following examples show how to use org.springframework.web.servlet.config.annotation.ViewResolverRegistry. 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 vote down vote up
@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: ApplicationConfigAdapter.java    From Agent-Benchmarks with Apache License 2.0 5 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    super.configureViewResolvers(registry);
    InternalResourceViewResolver viewResolver = new InternalResourceViewResolver();
    viewResolver.setPrefix("/pages/");
    viewResolver.setSuffix(".jsp");
    registry.viewResolver(viewResolver);
}
 
Example #3
Source File: WebConfig.java    From spring4-sandbox with Apache License 2.0 5 votes vote down vote up
@Override
	public void configureViewResolvers(ViewResolverRegistry registry) {
		registry
			.tiles();
//			.prefix("WEB-INF/views")
//			.suffix(".jspx");
	}
 
Example #4
Source File: ApplicationConfigAdapter.java    From Agent-Benchmarks with Apache License 2.0 5 votes vote down vote up
@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 vote down vote up
@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 vote down vote up
@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: MVCConfiguration.java    From seed with Apache License 2.0 5 votes vote down vote up
@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 #8
Source File: WebMvcAutoConfiguration.java    From halo with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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 #9
Source File: FilterRegister.java    From jfilter with Apache License 2.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    // Do nothing
}
 
Example #10
Source File: JavaConfigTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.tiles();
}
 
Example #11
Source File: EncodedUriTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.jsp("", "");
}
 
Example #12
Source File: JavaConfigTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.tiles();
}
 
Example #13
Source File: WebConfiguration.java    From servicecomb-pack with Apache License 2.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry viewResolverRegistry) {
  //compatible with spring-webmvc 4.x from spring boot 1.x
}
 
Example #14
Source File: JavaConfigTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.tiles();
}
 
Example #15
Source File: EncodedUriTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.jsp("", "");
}
 
Example #16
Source File: TilesApplicationConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
/**
 * Configure ViewResolvers to deliver views.
 */
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
    TilesViewResolver viewResolver = new TilesViewResolver();
    registry.viewResolver(viewResolver);
}
 
Example #17
Source File: WebConfig.java    From spring4-sandbox with Apache License 2.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	// registry.enableContentNegotiation(new MappingJackson2JsonView());
	registry.freeMarker().cache(false);
}
 
Example #18
Source File: WebConfig.java    From spring4-sandbox with Apache License 2.0 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry
		.viewResolver(viewResolver());
}
 
Example #19
Source File: EncodedUriTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Override
public void configureViewResolvers(ViewResolverRegistry registry) {
	registry.jsp("", "");
}