2
我有一個屬性文件這樣如何屬性文件項映射到地圖對象在Spring應用程序上下文XML
com.country.<COUNTRY>=<values comma seperated>
Ex.
com.country.UK=100,200
com.country.US=10,20
如今在未來可以有許多其他國家的條目添加 我可以在得到這些值一個Map<String,List<Integer>>
在春季應用上下文xml通過propertyPlaceHolder?
但如何讓我的動態屬性名稱和值映射? – JMJ
一旦加載屬性,我知道重新加載它們的唯一方法是[刷新](http://docs.spring.io/spring/docs/3.0.5.RELEASE/api/org/springframework/context/support/ AbstractApplicationContext.html#refresh%28%29)上下文。也許最好是創建自定義方法直接從文件(或數據庫)重新加載你的屬性,沒有多餘的上下文操作。 – arghtype