Nav

To 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.

In this topic: