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

The following examples show how to use org.springframework.web.servlet.view.script.ScriptTemplateViewResolver. 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: IsomorphicApplication.java    From spring-react-isomorphic with Apache License 2.0 5 votes vote down vote up
@Bean
public ViewResolver reactViewResolver() {
    ScriptTemplateViewResolver viewResolver = new ScriptTemplateViewResolver();
    viewResolver.setPrefix("static/templates/");
    viewResolver.setSuffix(".ejs");
    return viewResolver;
}
 
Example #2
Source File: ViewResolverRegistry.java    From spring-analysis-note with MIT License 4 votes vote down vote up
public ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example #3
Source File: ViewResolverRegistryTests.java    From spring-analysis-note with 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 File: ViewResolverRegistryTests.java    From spring-analysis-note with 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 File: ViewResolverRegistry.java    From java-technology-stack with MIT License 4 votes vote down vote up
public ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example #6
Source File: ViewResolverRegistryTests.java    From java-technology-stack with 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 File: ViewResolverRegistryTests.java    From java-technology-stack with 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 File: ViewResolverRegistry.java    From lams with GNU General Public License v2.0 4 votes vote down vote up
public ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example #9
Source File: ViewResolverRegistry.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
private ScriptRegistration() {
	super(new ScriptTemplateViewResolver());
	getViewResolver();
}
 
Example #10
Source File: ViewResolverRegistryTests.java    From spring4-understanding with Apache License 2.0 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 #11
Source File: ViewResolverRegistryTests.java    From spring4-understanding with Apache License 2.0 4 votes vote down vote up
@Test
public void scriptTemplateDefaultValues() {
	this.registry.scriptTemplate();
	ScriptTemplateViewResolver resolver = checkAndGetResolver(ScriptTemplateViewResolver.class);
	checkPropertyValues(resolver, "prefix", "", "suffix", "");
}