gpt4 book ai didi

java - 如何将命令行参数添加到 Intellij 中的运行配置?

转载 作者:行者123 更新时间:2023-12-02 03:38:57 24 4
gpt4 key购买 nike

使用 Intelij 时,如何将命令行参数添加到我的 Spring boot 应用程序。

当前打开编辑配置时的命令是:spring-boot:run:

enter image description here

我想在此之后添加一个命令行参数。

作为引用,我的主类扩展了 CommandLineRunner

最佳答案

在编辑配置中,您选择 Spring Boot 应用程序,然后您可以填写程序参数...请参阅 screenshot of Application Arguments Configuration .

enter image description here

这是 Spring Boot 配置

关于java - 如何将命令行参数添加到 Intellij 中的运行配置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37073278/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com