Knowledge Base

An archive of my personal knowledge base.

Multiple properties files in Spring context XML

Cristian Sulea

Spring allows to externalize string literals in its context configuration files into external properties files, in order to separate application specific settings from framework specific configuration.


This element activates the replacement of ${...} placeholders, resolved against the specified properties file (as a Spring resource location).

    location = ",


A property resource configurer that resolves placeholders in bean property values of context definitions.

    <property name="locations">
    <property name="ignoreUnresolvablePlaceholders" value="true"/>

Share on Twitter