1. 程式人生 > >[Spring boot] Application properties and configurations

[Spring boot] Application properties and configurations

mage rop found -a 技術 per src info server

We can use different application properties

技術分享圖片

application.properties:

server.port=9090

application-prod.properties:

server.port=80

application-test.properties:

server.port=9090

We can setup different properties for different env, more about configration can be found here

Run:

-Dspring.profiles.active=test

WIll run test env:

技術分享圖片

[Spring boot] Application properties and configurations