2013-11-21 48 views
0
class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
<property name="locations"> 
    <value>classpath*:app.properties</value> 

单加载属性文件工作正常,但现在我需要根据为请求(有效载荷)输入提供的语言来加载app_en.propertiesapp_fr.properties文件。如何配置这个?加载基于属性文件的语言属性占位

回答

0

使用列表标签这个

<property name="locations"> 
    <list> 
     <value>classpath*:app.properties</value> 
     <value>classpath*:app_en.properties</value> 
    </list> 
</property> 
+0

如何让基于语言 – user2883376

+0

从app.properties和app_en.properties消息通过这个http://tarlogonjava.blogspot.in/2009/02/tips-去关于-springs.html。读取优先级并设置订单部分.. – Ashish