IDEA 修改Springboot启动时的环境

Idea配置springboot多环境的切换的五种方案
参考URL: https://www.jianshu.com/p/670846f7a5d7

问题背景:

开发中不想修改主配置文件 application.yml 中的 active 属性,每次提交代码还得把它由 dev 改成prod,提交代码时需要刻意不提交它,能不能不修改它呢 ?当然是可以的,修改启动参数即可。

解决方法:
IDEA 修改Springboot启动时的环境如上图,二选一都行。

在Program arguments:输入指令–spring.profiles.active=dev
在Active Profiles:输入dev
IDEA 修改Springboot启动时的环境

相关文章:

  • 2021-12-31
  • 2021-10-17
  • 2021-09-22
  • 2021-11-14
  • 2021-05-28
  • 2022-01-03
  • 2021-11-17
  • 2021-09-17
猜你喜欢
  • 2022-01-25
  • 2022-12-23
  • 2021-04-10
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2021-07-18
相关资源
相似解决方案