2013-11-21 50 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