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

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

Introduction

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

Prototype

public void setDefaultEncoding(String defaultEncoding) 

Source Link

Document

Set the default encoding for the FreeMarker configuration.

Usage

From source file:com.teradata.benchto.driver.DriverApp.java

@Bean
public FreeMarkerConfigurationFactoryBean freemarkerConfiguration() throws IOException, TemplateException {
    FreeMarkerConfigurationFactoryBean factory = new FreeMarkerConfigurationFactoryBean();
    factory.setDefaultEncoding("UTF-8");
    return factory;
}

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  w w. j ava  2  s. co  m
}