Mule Tip: Multiple PropertyPlaceholders in same Mule Configuration


If you want to avoid including parameters (probably connection related parameters) in your Mule , you can use property placeholders, which will allow you to upload these parameters from a properties file. This enables you, for example, to have different property files for different environments (Dev, QA, Prod) or allows you to reuse the same value in different parts of your .

I recently ran into the case where I wanted to configure specific configuration parameters in different properties files. Basically I wanted to have two files and in the classpath and make the values in each these property files available in Mule configuration as Spring property placeholders. The trick here is to add the property ignoreUnresolvablePlaceholders and set it to true in the first placeholder, so that Spring will load values for the next ones.

The default value for the property ignoreUnresolvablePlaceholders is false, and if not set, the previous Mule code will through the following exception:

Stay tuned for more Mule Tips!

We'd love to hear your opinion on this post

5 Responses to “Mule Tip: Multiple PropertyPlaceholders in same Mule Configuration”

  1. Hi,

    I guess you can achieve the same behavior using a comma separated list, like:

    With the context namespace:


    /Tomas Blohm

    • Hi Tomas. Thanks for your comment. It sees like part of your comment was a piece of code we are not able to see. Can you please post it again without formatting or send it to me so I can share it with others?
      Thank you very much.

  2. I add multiple properties files by separating them with a comma, like this:

    • Hi Henrik. Thanks for your comment. For some reason part of the code you posted is not visible in your comments. Can you please share it again without formatting or send it to me so I can share it with the rest of the readers.
      Thanks again.

  3. OK, here it comes again:
    context:property-placeholder location=”,”