有没有一种方法可以相对于Spring的上下文文件本身引用文件系统(而不是类路径)上的属性文件?
我想做的是:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<!-- I want the below to be relative to this context XML file. -->
<value>app.properties</value>
</list>
</property>
</bean>
我在想象
${contextpath}
我可以预先准备上面的“app.properties”,但找不到任何有用的东西。
谢谢。