7/31/2013

Set Spring Property File Encoding

<bean id="contextPropertyConfigurer"
    class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
     <property name="locations">
         <list>
             <value>classpath:test.properties</value>
         </list>
     </property>
     <property name="fileEncoding" value="UTF-8"/>
</bean>
<bean id="sysConfig" 
    class="org.springframework.beans.factory.config.PropertiesFactoryBean">
    <property name="location" value="classpath:test.properties"/>
    <property name="fileEncoding" value="UTF-8"/>
</bean>

0 comments:

Post a Comment