Vicky
Vicky

Reputation: 17385

locations property in PropertyPlaceholderConfigurer class

Whenever we want to inject a list of properties file, we put the below code block in our xml:

<beans:bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <beans:property name="locations">
        <beans:list>
            <beans:value>abc.properties</beans:value>
            <beans:value>pqr.properties</beans:value>
        </beans:list>
    </beans:property>
</beans:bean>

However when I see the source code of class PropertyPlaceholderConfigurer, I do not see any list property named "locations".

Why is that so ?

How actually does it work ?

Thanks for reading!

Upvotes: 1

Views: 763

Answers (1)

Tomasz Nurkiewicz
Tomasz Nurkiewicz

Reputation: 340803

It is in the PropertiesLoaderSupport which PropertyPlaceholderConfigurer inherits from.

PropertyPlaceholderConfigurer

Where's Wally?

Upvotes: 1

Related Questions