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: