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

java 8 Duration usage example

java 8 Duration usage example

Java 8 Duration features: Duration uses time based constructs. Measures machine-based time such as Instant. Duration can have negative value. Measured in seconds and nano-seconds. Does not use date based constructs such as year,month and days. Parse ISO-8601 representation of