Mule 3.3 ignore-resource-not-found

时间:2013-02-14 16:29:28

标签: spring properties mule

我正在使用Mule Studio 1.3.2,它相当于我相信的Mule 3.3。

我正在使用property-placeholder元素。我想使用具有可选覆盖文件的here描述的技术。但是,在Mule Studio中,ignore-resource-not-found属性被标记为错误:属性ignore-resource-not-found未定义为property-placeholder的有效属性

<context:property-placeholder location="classpath:config.properties" ignore-resource-not-found="true" />

这是破了还是我在做些傻事?

1 个答案:

答案 0 :(得分:2)

Mule 3.3使用Spring context 3.1 schema

支持ignore-resource-not-found属性

<xsd:complexType name="propertyPlaceholder">
   <xsd:attribute name="location" type="xsd:string">...</xsd:attribute>
   <xsd:attribute name="properties-ref" type="xsd:string">...</xsd:attribute>
   <xsd:attribute name="file-encoding" type="xsd:string">...</xsd:attribute>
   <xsd:attribute name="order" type="xsd:integer">...</xsd:attribute>
   <xsd:attribute name="ignore-resource-not-found" type="xsd:boolean" default="false">
      <xsd:annotation>
         <xsd:documentation><![CDATA[Specifies if failure to find the property resource location should be ignored. Default is "false", meaning that if there is no file in the location specified an exception will be raised at runtime.]]>
         </xsd:documentation>
      </xsd:annotation>
   </xsd:attribute>
   <xsd:attribute name="ignore-unresolvable" type="xsd:boolean" default="false">...         </xsd:attribute>
   <xsd:attribute name="local-override" type="xsd:boolean" default="false">...</xsd:attribute>
</xsd:complexType>

所以,你做的是正确的事

相关问题