Free MuleSoft CONNECT Keynote & Expo Pass Available!

Register now+
Nav

Introduction to Mule 4: Configuring Mule Apps

In Mule 3, Spring property placeholders are often used to configure apps dynamically for the environment in which they are deployed. Mule 4 contains a built-in mechanism for this that allows you to set default values and avoid the need to learn Spring.

These properties are stored in a YAML file:

http:
  path: service
  port: "10000"

You can add the YAML file to your Mule app through the Global Element called Configuration Properties. The XML for it looks like this:


         
      
1
<configuration-properties file="myConfiguration.yaml" />

MuleSoft highly recommends that you do not package the configuration files for all the environments inside your app. Instead, you should use this file to provide defaults, then use Runtime Manager to override each of these properties at deployment time.

In this topic: