springboot:spring.profiles.active

使用maven-install命令导出jar包. 

springboot:spring.profiles.active

 

springboot:spring.profiles.active

 

使用 "java -jar jar包名称" 运行jar包

           java -jar   springbootmvcproject-0.0.1-SNAPSHOT.jar   --spring.profiles.active=test

           --spring.profiles.active=test传递参数, springboot会使用application-test.properties的设置启动springboot

springboot:spring.profiles.active

springboot:spring.profiles.active