【发布时间】:2013-09-07 20:45:15
【问题描述】:
我想在属性占位符的位置使用环境变量,但我不明白:
我是这样尝试的:
<context:property-placeholder location="${CATALINA_HOME}/conf/database.properties" order="0"/>
但我收到此错误
org.springframework.beans.factory.BeanInitializationException: 可以 不加载属性;嵌套异常是 java.io.FileNotFoundException:无法打开 ServletContext 资源 [/${CATALINA_HOME}/conf/database.properties]
另外,我没有找到有关在上下文配置或属性占位符中使用环境变量的文档。
亲切的问候。
【问题讨论】:
标签: java spring applicationcontext