org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver Java Examples

The following examples show how to use org.springframework.web.servlet.view.groovy.GroovyMarkupViewResolver. 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: GroovyConfiguration.java    From apm-agent-java with Apache License 2.0 5 votes vote down vote up
@Bean
public GroovyMarkupViewResolver thymeleafViewResolver() {
    GroovyMarkupViewResolver viewResolver = new GroovyMarkupViewResolver();
    viewResolver.setPrefix("");
    viewResolver.setSuffix(".tpl");
    return viewResolver;
}
 
Example #2
Source File: FixGroovyWebConfiguration.java    From onetwo with Apache License 2.0 5 votes vote down vote up
@Bean
@ConditionalOnMissingBean(name = "groovyMarkupViewResolver")
public GroovyMarkupViewResolver groovyMarkupViewResolver() {
	GroovyMarkupViewResolver resolver = super.groovyMarkupViewResolver();
	resolver.setViewClass(FixGroovyMarkupView.class);
	return resolver;
}
 
Example #3
Source File: ViewResolverRegistry.java    From spring-analysis-note with MIT License 4 votes vote down vote up
public GroovyMarkupRegistration() {
	super(new GroovyMarkupViewResolver());
	getViewResolver().setSuffix(".tpl");
}
 
Example #4
Source File: ViewResolverRegistryTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void groovyMarkup() {
	this.registry.groovy().prefix("/").suffix(".groovy").cache(true);
	GroovyMarkupViewResolver resolver = checkAndGetResolver(GroovyMarkupViewResolver.class);
	checkPropertyValues(resolver, "prefix", "/", "suffix", ".groovy", "cacheLimit", 1024);
}
 
Example #5
Source File: ViewResolverRegistryTests.java    From spring-analysis-note with MIT License 4 votes vote down vote up
@Test
public void groovyMarkupDefaultValues() {
	this.registry.groovy();
	GroovyMarkupViewResolver resolver = checkAndGetResolver(GroovyMarkupViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", ".tpl");
}
 
Example #6
Source File: ViewResolverRegistry.java    From java-technology-stack with MIT License 4 votes vote down vote up
public GroovyMarkupRegistration() {
	super(new GroovyMarkupViewResolver());
	getViewResolver().setSuffix(".tpl");
}
 
Example #7
Source File: ViewResolverRegistryTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void groovyMarkup() {
	this.registry.groovy().prefix("/").suffix(".groovy").cache(true);
	GroovyMarkupViewResolver resolver = checkAndGetResolver(GroovyMarkupViewResolver.class);
	checkPropertyValues(resolver, "prefix", "/", "suffix", ".groovy", "cacheLimit", 1024);
}
 
Example #8
Source File: ViewResolverRegistryTests.java    From java-technology-stack with MIT License 4 votes vote down vote up
@Test
public void groovyMarkupDefaultValues() {
	this.registry.groovy();
	GroovyMarkupViewResolver resolver = checkAndGetResolver(GroovyMarkupViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", ".tpl");
}
 
Example #9
Source File: ViewResolverRegistry.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public GroovyMarkupRegistration() {
	super(new GroovyMarkupViewResolver());
	getViewResolver().setSuffix(".tpl");
}
 
Example #10
Source File: ViewResolverRegistry.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
private GroovyMarkupRegistration() {
	super(new GroovyMarkupViewResolver());
	getViewResolver().setSuffix(".tpl");
}
 
Example #11
Source File: ViewResolverRegistryTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void groovyMarkup() {
	this.registry.groovy().prefix("/").suffix(".groovy").cache(true);
	GroovyMarkupViewResolver resolver = checkAndGetResolver(GroovyMarkupViewResolver.class);
	checkPropertyValues(resolver, "prefix", "/", "suffix", ".groovy", "cacheLimit", 1024);
}
 
Example #12
Source File: ViewResolverRegistryTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void groovyMarkupDefaultValues() {
	this.registry.groovy();
	GroovyMarkupViewResolver resolver = checkAndGetResolver(GroovyMarkupViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", ".tpl");
}
 
Example #13
Source File: GroovyConfiguration.java    From tutorials with MIT License 4 votes vote down vote up
@Bean
public GroovyMarkupViewResolver thymeleafViewResolver() {
    GroovyMarkupViewResolver viewResolver = new GroovyMarkupViewResolver();
    viewResolver.setSuffix(".tpl");
    return viewResolver;
}