Java Code Examples for org.springframework.web.servlet.view.script.ScriptTemplateViewResolver

The following examples show how to use org.springframework.web.servlet.view.script.ScriptTemplateViewResolver. These examples are extracted from open source projects. 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
@Bean
public ViewResolver reactViewResolver() {
    ScriptTemplateViewResolver viewResolver = new ScriptTemplateViewResolver();
    viewResolver.setPrefix("static/templates/");
    viewResolver.setSuffix(".ejs");
    return viewResolver;
}
 
Example 2
Source Project: spring-analysis-note   Source File: ViewResolverRegistry.java    License: MIT License 4 votes vote down vote up
public ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example 3
Source Project: spring-analysis-note   Source File: ViewResolverRegistryTests.java    License: MIT License 4 votes vote down vote up
@Test
public void scriptTemplate() {
	this.registry.scriptTemplate().prefix("/").suffix(".html").cache(true);
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "/", "suffix", ".html", "cacheLimit", 1024);
}
 
Example 4
Source Project: spring-analysis-note   Source File: ViewResolverRegistryTests.java    License: MIT License 4 votes vote down vote up
@Test
public void scriptTemplateDefaultValues() {
	this.registry.scriptTemplate();
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", "");
}
 
Example 5
Source Project: java-technology-stack   Source File: ViewResolverRegistry.java    License: MIT License 4 votes vote down vote up
public ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example 6
Source Project: java-technology-stack   Source File: ViewResolverRegistryTests.java    License: MIT License 4 votes vote down vote up
@Test
public void scriptTemplate() {
	this.registry.scriptTemplate().prefix("/").suffix(".html").cache(true);
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "/", "suffix", ".html", "cacheLimit", 1024);
}
 
Example 7
Source Project: java-technology-stack   Source File: ViewResolverRegistryTests.java    License: MIT License 4 votes vote down vote up
@Test
public void scriptTemplateDefaultValues() {
	this.registry.scriptTemplate();
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", "");
}
 
Example 8
Source Project: lams   Source File: ViewResolverRegistry.java    License: GNU General Public License v2.0 4 votes vote down vote up
public ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example 9
private ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example 10
@Test
public void scriptTemplate() {
	this.registry.scriptTemplate().prefix("/").suffix(".html").cache(true);
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "/", "suffix", ".html", "cacheLimit", 1024);
}
 
Example 11
@Test
public void scriptTemplateDefaultValues() {
	this.registry.scriptTemplate();
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", "");
}