问题
我正在尝试设置ignore-unresolvable="true"
.
我从如何在春季定义非强制性属性的问题中找到了答案https://stackoverflow.com/a/11773267/1688441 ?.
他们展示的例子是:
<context:property-placeholder ignore-unresolvable="true" ... />
但是,在我继承的项目中,我们有一个名为的项目文件project.xml
,其中包含Resource
带有Context
标签的定义。
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource />
<ResourceLink />
<Resource />
</Context>
注意:资源已被删除
当我编辑Context
标签以添加ignore-resolvable
所有内容时,甚至我的DataSource
资源都没有被读取。有人有想法么?
我尝试了以下方法:
<Context:property-placeholder ignore-unresolvable="true">
可能相关:
spring PropertyPlaceholderConfigurer 和 context:property-placeholder