我有以下Spring配置文件:負載JNDI資源的來龍去脈:財產佔位
<context:property-placeholder order="2"
ignore-unresolvable="true" ignore-resource-not-found="true"
location="file:///${user.home}/application.properties" />
<context:property-placeholder order="1"
ignore-unresolvable="true" ignore-resource-not-found="true"
location="file:///C:/Services/Tomcat 6.0/cms/application.properties" />
<context:property-placeholder order="3"
location="classpath:com/afrozaar/cms/service/application.properties" />
注意他們是如何排序的,有些是在類路徑中,有些是在文件系統上。
現在要混合我想添加通過jndi加載的屬性文件。我希望能夠做到
<context:property-placeholder order="2"
ignore-unresolvable="true" ignore-resource-not-found="true"
location="jndi:url/application.properties" />
不幸的是,這是行不通的,spring不支持jndi前綴...... AFAIK。
那麼,我可以這樣做嗎?
如果我不能取什麼樣的選擇。我不想將我的整個配置轉換爲基於完整bean的屬性佔位符配置器。
不知道怎麼這會有所幫助... – Wouter