[Spring-boot] Multi environment configuration

  application-{profile}.properties 

  

According to create two configuration file format, a DEV environment, a testing environment

Modify its port:

server.port=8888  DEV   
server.port = 9999 TEST 

program then packaged

open CMD executed
java -jar xxx.jar --spring.profiles.active=dev 
java -jar xxx.jar --spring.profiles.active=test

 

Guess you like

Origin www.cnblogs.com/anny0404/p/11010358.html