有什么方法可以通过 spring 配置文件来调试 spring boot 应用程序

时间:2021-04-02 05:12:18

标签: spring spring-boot

下面是我用来通过添加配置文件来运行 spring boot 应用程序的命令,但我无法从 eclipse/sts 以调试模式运行 spring boot 应用程序,有什么方法可以在 sts/eclipse 和在调试模式下运行应用程序?

mvn spring-boot:run -Dspring-boot.run.profiles=seed,create,dev1,dbH2:从命令提示符

and from eclipse/sts 我正在使用 project->Debug As->Debug configuration ,在目标中我通过下面的命令

spring-boot:run -Dspring-boot.run.profiles=seed,create,dev1,dbH2

1 个答案:

答案 0 :(得分:1)

您可以将 -Dspring.profiles.active={profiles} 添加到 Eclipse 中的 VM 参数,如下所示

  1. 点击调试配置
  2. 点击参数标签
  3. 将 -Dspring.profiles.active=seed,create,dev1,dbH2 添加到 Vm 参数
相关问题