Contact Us 1-800-596-4880

Create Placeholders for Spring Configurations

This version of Mule reached its End of Life on May 2, 2023, 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.

The Spring module in a Mule app can use any sort of Spring configurations. You can define the Spring property placeholders in a .properties file (for example, spring-properties.properties) that are fully interoperable with the Spring module.

The properties in the file takes this form:

springPropertyA=springPropertyAValue
springPropertyB=springPropertyBValue

In Anypoint Studio, you must store the file in the project directory for your Mule app:

  • /src/main/resources

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

<configuration-properties file="spring-properties.properties" doc:name="Spring Property Placeholders" doc:id="07ee5c11-bc54-4d55-91b8-ce02f743cb7a" />

Note that you cannot use a YAML file to create Spring property placeholders, as you can for non-Spring modules.