How to load multiple properties files in Spring

How to load multiple properties files in Spring

Loading multiple properties files in spring framework can be accomplished in following ways. JavaConfig approach using @PropertySources annotation XML configuration approach using context:property-placeholder Sample Property files env.properties: jdbc.url=127.0.0.1 jdbc.userid= jdbc.userid.default=admin jdbc.port=1521 env2.properties: jdbc.userid=codesimplify jdbc.port=1111 1. JavaConfig approach using @PropertySources annotation