Java Code Examples for org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfigurer#setTemplateLoaderPath()

The following examples show how to use org.springframework.web.reactive.result.view.freemarker.FreeMarkerConfigurer#setTemplateLoaderPath() . 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: RequestMappingViewResolutionIntegrationTests.java    From spring-analysis-note with MIT License 5 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfig() {
	FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
	configurer.setPreferFileSystemAccess(false);
	configurer.setTemplateLoaderPath("classpath*:org/springframework/web/reactive/view/freemarker/");
	return configurer;
}
 
Example 2
Source File: RequestMappingViewResolutionIntegrationTests.java    From java-technology-stack with MIT License 5 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfig() {
	FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
	configurer.setPreferFileSystemAccess(false);
	configurer.setTemplateLoaderPath("classpath*:org/springframework/web/reactive/view/freemarker/");
	return configurer;
}
 
Example 3
Source File: WebConfig.java    From webFluxTemplate with MIT License 5 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer(ReactiveWebApplicationContext applicationContext) {
	FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
	configurer.setTemplateLoaderPath("classpath:/templates/");
	configurer.setResourceLoader(applicationContext);
	return configurer;
}
 
Example 4
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 5 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfig() {
    Map<String, Object> variables = new HashMap<>();
    variables.put("xml_escape", new XmlEscape());

    FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
    configurer.setPreferFileSystemAccess(false);
    configurer.setTemplateLoaderPath("classpath:/templates");
    configurer.setResourceLoader(this.ctx);
    configurer.setFreemarkerVariables(variables);

    return configurer;
}
 
Example 5
Source File: WebConfig.java    From spring-reactive-sample with GNU General Public License v3.0 5 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfig() {
    FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
    configurer.setPreferFileSystemAccess(false);
    configurer.setTemplateLoaderPath("classpath:/templates/");
    configurer.setResourceLoader(this.ctx);
    return configurer;
}
 
Example 6
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer() {
    FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
    configurer.setTemplateLoaderPath("classpath:/freemarker/");
    return configurer;
}
 
Example 7
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer() {
    FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
    configurer.setTemplateLoaderPath("classpath:/freemarker/");
    return configurer;
}
 
Example 8
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer() {
    FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
    configurer.setTemplateLoaderPath("classpath:/freemarker/");
    return configurer;
}
 
Example 9
Source File: WebfluxConfig.java    From Hands-On-Reactive-Programming-with-Reactor with MIT License 4 votes vote down vote up
@Bean
public FreeMarkerConfigurer freeMarkerConfigurer() {
    FreeMarkerConfigurer configurer = new FreeMarkerConfigurer();
    configurer.setTemplateLoaderPath("classpath:/freemarker/");
    return configurer;
}