Contact Free trial Login

Create Placeholders for Spring Configurations

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.

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.