在我的applicationContext.xml我有这个spring配置
<context:property-placeholder location="file:#{ systemProperties['outsideConfigFile'] }" />
我开始了我的tomcat与-DoutsideConfigFile = /路径/要/我的/ file.properties(认证)
这似乎并没有工作,我得到
INFO : org.springframework.beans.factory.config.PropertyPlaceholderConfigurer - Loading properties file from URL [file:#{ systemProperties['outsideConfigFile'] }]
然后
ERROR: org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: (No such file or directory)
有没有人有anyideas如何得到它的工作?我认为问题在于Spring无法读取给定的系统属性文件。
非常感谢 - MB
解释你的意思似乎并不奏效? –
“似乎不起作用”是什么意思?你会得到一个异常?春天不加载?春天说财产没有价值? –
更新问题,对不起,好点。 –