Muka
Muka

Reputation: 1200

One properties configuration file for Multi Apps on Mule ESB runtime

Today I have the same properties configurated on mule-app.properties file for each Apps. Like this:

enter image description here

All Apps (+ that 5) are running on the same Mule ESB runtime (CE).

For example, when It is necessary to change a host or password, I need to change the properties file of the all apps.

I would like to have just one properties file on Mule ESB runtime shared by all apps.

Is there a form to make this?

Thanks!

Upvotes: 1

Views: 1057

Answers (2)

Alexis Ochoa
Alexis Ochoa

Reputation: 136

You can create a new Mule project and call it "shared". Now, in this project, you can create a file src/main/resources/config.properties and there put all the settings you need.

To have these settings in your current project, just add the project "shared" in the "Projects" tab of the "Java Build Path". Then in the main file of your current project, write

< context: property-placeholder location="config.properties" />

Upvotes: 1

Ryan Carter
Ryan Carter

Reputation: 11606

Use a Spring Property Placeholder and read a single file from the filesystem:

<context:property-placeholder location="file:/path/to/myConfigFile.properties" />

https://docs.mulesoft.com/mule-user-guide/v/3.6/configuring-properties#properties-files

Upvotes: 1

Related Questions