Profile specific Property Configurations

To load different properties depending upon environment, Spring allows to create different file which are profile specific. Convention for such properties file is application-{profile}.properties. By default, only is loaded and this can be overridden by giving cmd line option

Code reference:

Following are the contents of and respectively.

By default will be picked. If profile uat is passed in cmd line options then will be picked, cmd is as shown below:

java -jar <jarname>.jar

Prev      TOC      Next