application-{profile}.properties 

  [spring-boot] 多环境配置

按照格式创建两个配置文件,一个DEV环境,一个测试环境

修改其端口:

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

然后程序进行打包

打开CMD 执行
java -jar xxx.jar --spring.profiles.active=dev 
java -jar xxx.jar --spring.profiles.active=test

 

相关文章:

  • 2021-09-02
  • 2022-01-11
  • 2022-12-23
  • 2021-11-15
  • 2021-08-07
猜你喜欢
  • 2021-07-20
  • 2021-09-07
  • 2022-12-23
  • 2021-09-12
  • 2021-08-01
  • 2021-06-22
相关资源
相似解决方案