我在 spring 中加载属性文件:
<context:property-placeholder location="classpath:foo.properties"/>
但是如果我尝试在不同的上下文文件中加载另一个文件,则会出现错误。
最佳答案
根据来源,您必须提供以逗号分隔的属性文件资源列表。 这应该适合您:
<context:property-placeholder location="classpath:foo1.properties,classpath:foo2.properties"/>
关于java - spring中的多个属性文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8045727/