Mule 3.3.0 - 未从属性文件中解析全局属性

use*_*140 5 mule

未从属性文件解析全局属性,因此mmc部署失败.任何想法为什么会出错?

<context:property-placeholder location="airports.properties" />
<global-property name="airportslist" value="${airportslist}" />
Run Code Online (Sandbox Code Playgroud)

获得以下异常 -

com.mulesoft.mmc.agent.v3.dto.DeploymentException: Unexpected exception parsing XML document from URL [file:/arprt/mule-esb-ee/mule-enterprise-standalone-3.3.0/apps/myapp-1.0.0-SNAPSHOT/myapp-config.xml]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'airportslist' (org.mule.api.lifecycle.InitialisationException) (org.mule.api.config.ConfigurationException)
        at com.mulesoft.mmc.agent.service.impl.ApplicationServiceImpl.deploy(ApplicationServiceImpl.java:245)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

airports.properties包含上述属性:

  airportslist={'SFO', 'YYZ', 'DFW'}
Run Code Online (Sandbox Code Playgroud)

Dav*_*sot 4

global-property如果该属性是在属性文件中定义并使用context:property-placeholder.

只需删除:

<global-property name="airportslist" value="${airportslist}" />
Run Code Online (Sandbox Code Playgroud)

${airportslist}并在配置中任何需要的地方使用它。