下面是定义 PropertyPlaceholderConfigurer bean 的 spring-context.xml 的一部分:
<bean id="propertyResource" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:property-files/config-info.properties</value>
<value>classpath:property-files/biservices-config.properties</value>
<value>classpath:dao-config.properties</value>
<value>classpath:environmentLocator.properties</value>
</list>
</property>
</bean>
但是,在放了一个断点@之后,PropertyPlaceholderConfigurer#setLocations
我并没有发现所有的属性文件都被传递给了setter方法。
请注意,文件 environmentLocator.properties 和 dao-config.properties 存在于不同的 jar 文件中,尽管它们位于类路径中。可能是什么问题?