【发布时间】:2019-08-23 10:18:12
【问题描述】:
我正在开发 Mule ESB 3.9.0 社区版。 我必须将 esb 应用程序部署到不同的环境,如 dev、int、prod 等。所以我做了以下事情:
mule-app.properties:
env = dev
并创建了三个属性文件:
esb-frontoffice-dev.config.properties
esb-frontoffice-int.config.properties
esb-frontoffice-prod.config.properties
现在在 ESB 配置文件中,我定义了属性占位符,如下所示:
<context:property-placeholder location="esb-frontoffice-${env}.config.properties"/>
然后在构建工件之后,我将其部署在 Mule ESB 3.9.0 运行时服务器中。但我收到以下错误:
Caused by: java.io.FileNotFoundException: class path resource [esb-frontoffice-${env}.config.properties] cannot be opened because it does not exist
at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:172) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.core.io.support.EncodedResource.getInputStream(EncodedResource.java:150) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.core.io.support.PropertiesLoaderUtils.fillProperties(PropertiesLoaderUtils.java:98) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.core.io.support.PropertiesLoaderSupport.loadProperties(PropertiesLoaderSupport.java:175) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.core.io.support.PropertiesLoaderSupport.mergeProperties(PropertiesLoaderSupport.java:156) ~[spring-core-4.1.6.RELEASE.jar:4.1.6.RELEASE]
at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:80) ~[spring-beans-4.1.6.RELEASE.jar:4.1.6.RELEASE]
... 36 more
【问题讨论】:
标签: mule-esb