Example usage for org.springframework.ui.freemarker FreeMarkerConfigurationFactoryBean setTemplateLoaderPaths

List of usage examples for org.springframework.ui.freemarker FreeMarkerConfigurationFactoryBean setTemplateLoaderPaths

Introduction

In this page you can find the example usage for org.springframework.ui.freemarker FreeMarkerConfigurationFactoryBean setTemplateLoaderPaths.

Prototype

public void setTemplateLoaderPaths(String... templateLoaderPaths) 

Source Link

Document

Set multiple Freemarker template loader paths via Spring resource locations.

Usage

From source file:br.eti.danielcamargo.backend.common.config.context.CoreConfig.java

@Bean
public FreeMarkerConfigurationFactoryBean freemarkerMailConfiguration() throws PropertyVetoException {

    FreeMarkerConfigurationFactoryBean bean = new FreeMarkerConfigurationFactoryBean();
    bean.setTemplateLoaderPaths("classpath:/");
    bean.setDefaultEncoding("UTF-8");

    Properties properties = new Properties();
    properties.put("locale", "pt_BR");
    bean.setFreemarkerSettings(properties);

    return bean;//from  w  ww .java 2  s.co m
}