Introducing external configuration files into spring XML db.properties

 <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="db.properties"></property>
</bean>

or

<context:property-placeholder location="db.properties"/>

Read More: