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

标签 mule

未从属性文件解析全局属性,因此 mmc 部署失败。任何想法为什么可能是错误的?

<context:property-placeholder location="airports.properties" />
<global-property name="airportslist" value="${airportslist}" />

出现以下异常 --

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 contains the above mentioned property:

  airportslist={'SFO', 'YYZ', 'DFW'}

最佳答案

如果属性是在属性文件中定义并使用 context:property-placeholder 加载的,则无需声明 global-property

只需删除:

<global-property name="airportslist" value="${airportslist}" />

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

关于Mule 3.3.0 - 全局属性未从属性文件中解析,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14782396/

相关文章:

mule - 如何在 Munit 中附加文件以进行功能测试用例 - Mule ESB

java - 同时调用 2 个 Restful Web 服务。可以用骡子吗?

compiler-errors - 找不到org.mule.module.client.MuleClient编译错误

java - JAXB+骡子。避免在 XML 转换中使用 namespace

mule - 如何在不重新启动的情况下在 Mule 中部署新流?

mule - flow-ref 和处理策略

mysql - 使用 jdbc-provider 在 Mule 中配置 Spring Security

java - 从 Eclipse 运行 Mule 应用程序时出现 NoSuchMethodError 异常

java - 埃斯珀运行一段时间后停止工作

ule子流-命名约定