下面是我用来通过添加配置文件来运行 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
答案 0 :(得分:1)
您可以将 -Dspring.profiles.active={profiles} 添加到 Eclipse 中的 VM 参数,如下所示