Example usage for org.springframework.beans.factory.config PropertiesFactoryBean setFileEncoding

List of usage examples for org.springframework.beans.factory.config PropertiesFactoryBean setFileEncoding

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config PropertiesFactoryBean setFileEncoding.

Prototype

public void setFileEncoding(String encoding) 

Source Link

Document

Set the encoding to use for parsing properties files.

Usage

From source file:net.cloudkit.enterprises.infrastructure.configuration.ApplicationConfiguration.java

public PropertiesFactoryBean propertiesFactoryBean() {
    PropertiesFactoryBean propertiesFactoryBean = new PropertiesFactoryBean();
    Properties properties = new Properties();
    properties.put("text", 123456);
    propertiesFactoryBean.setProperties(properties);

    propertiesFactoryBean.setLocations();
    propertiesFactoryBean.setFileEncoding("UTF-8");
    return propertiesFactoryBean;
}