【问题标题】:'run' is not a valid command. See 'help'. when trying to run command 'spring run hello.groovy'\'run\' 不是有效命令。请参阅“帮助”。当尝试运行命令 \'spring run hello.groovy\'
【发布时间】:2023-02-25 21:07:33
【问题描述】:

显然,运行不是 spring 的有效命令。

我的路径变量已正确存储,如下图所示。 enter image description here

Spring --version 命令显示正确的版本。 (春季 CLI v3.0.1)

我不确定这里的问题是什么。

enter image description here

我也试过上面的命令。 (这是官方的 spring 安装文档)

但是,我没有得到预期的结果。 enter image description here

【问题讨论】:

标签: spring-boot


【解决方案1】:

“运行”命令在 3.0.0 版本中被删除

【讨论】:

【解决方案2】:

我也面临同样的问题。我无法运行“spring install org.springframework.cloud:spring-cloud-cli:2.2.0.BUILD-SNAPSHOT” 收到错误“安装”不是有效命令

版本:Spring CLI v3.0.3

【讨论】:

【解决方案3】:

正如已经提到的其他 cmets 和答案一样,使用 spring cli 3.0.x,run 命令与其他一些命令一起被删除。

他们的 Github 页面上已经有一些问题: 这个问题描述了你的确切问题:https://github.com/spring-projects/spring-boot/issues/33482

其中引用了这个问题,计划删除这些命令:https://github.com/spring-projects/spring-boot/issues/32263

【讨论】:

    猜你喜欢
    • 2021-08-29
    • 2020-01-23
    • 2021-11-27
    • 1970-01-01
    • 2020-01-09
    • 2021-10-14
    • 1970-01-01
    • 2021-05-04
    • 2020-02-02
    相关资源
    最近更新 更多