[Spring boot] Application properties and configurations

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:

猜你喜欢

转载自www.cnblogs.com/Answer1215/p/10269168.html