Gradle 4.9 引入了 --args
bootRun
的参数,我可以从命令行轻松使用它,但是如何从 Intellij 2018 的运行/调试配置中使用它?
使用 Gradle 构建集运行 bootRun
我在 Intellij 项目中的任务,我在运行/调试配置屏幕中尝试了以下参数但没有成功:
--args 'foo'
--args='foo'
--args=foo
Intellij 的输出:
9:18:56 AM: Executing task 'bootRun --args='foo''...
Unknown command-line option '--args'.
9:18:57 AM: Task execution finished 'bootRun --args='foo''.
A similar question documents the older syntax for doing this .
最佳答案
也许你可以将你的参数添加到 Tasks
如 bootRun --args='foo'
在 IDEA 的 Run/Debug Configurations
.
我的任务是 run --args='-h'
它对我有用
关于gradle - 如何在 Intellij 中使用带有 --args 的 Gradle bootRun,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52267489/