http:
path: service
port: "10000"
Introduction to Mule 4: Configuring Mule Apps
Standard Support for Mule 4.1 ended on November 2, 2020, and this version of Mule reached its End of Life on November 2, 2022, when Extended Support ended. Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted. MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements. |
Although Mule 3 required you to know how to use Spring property placeholders to configure apps dynamically for the environment in which they are deployed, Mule 4 contains a built-in mechanism that enables you to set default values in a YAML file.
Mule 3 supports .properties
configuration files, while Mule 4 supports both .yaml
and .properties
configuration files. The recommended approach is to use .yaml
configuration files, because it allows the addition of type validations and autocompletion.
Following is an example of a .yaml
configuration file:
You can add the YAML file to your Mule app through the Configuration Properties Global Element. The XML configuration looks like this:
<configuration-properties file="myConfiguration.yaml" />
In Mule 4, creating a new application via Anypoint Studio no longer automatically adds the default mule-app.properties
file added in Mule 3.
If you choose to create a custom .properties
file, you also need to configure it in your Mule app via the Configuration Properties Global Element. The XML configuration looks like this:
<configuration-properties file="myConfiguration.properties"/>
MuleSoft recommends that you not package the configuration files for all the environments inside your app. Instead, you should use a .yaml
file to provide defaults, and then use Runtime Manager to override each of these properties at deployment time.