2013-02-14 99 views
1

我正在使用Mule Studio 1.3.2,它對應於騾3.3我相信。騾3.3忽略資源未找到

我正在使用一個property-placeholder元素。我想使用描述爲here的技術,該技術具有可選的覆蓋文件。然而,忽視資源未找到的屬性被標記爲騾子Studio中的錯誤:屬性忽略資源未找到沒有被定義爲財產佔位的有效屬性

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

是這破了還是我做點傻事?

回答

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> 

所以,你在做正確的事

+0

嗯。我無法將圖片上傳到StackOverflow,因爲我沒有足夠的信譽點,但是有一張圖像顯示了這裏的問題:http://i775.photobucket.com/albums/yy35/tdeffler/ignore_resource_zps73363fab.jpg – Tad 2013-02-14 18:07:42

+0

Mule工作室顯​​示很多東西的錯誤,但它運行良好。嘗試運行它,並應運行良好 – 2013-02-14 18:39:18

+0

啊,我不知道穆勒工作室不能依靠。謝謝。 – Tad 2013-02-14 20:04:04

0

窗口 - >首選項 - >騾子工作室 - >關閉錯誤在XML編輯器中報告

這可能會讓有效的錯誤,但在我的情況下,我覈實了一切正常工作後打開它。只是不停地討厭我,那些「紅色標記」。

當您修改流程時,請不要忘記關閉它。