Я работаю над Mule ESB версии 3.9.0 Community Edition. Мне нужно развернуть приложение 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