Search code examples
spring-shell

The Availability Doesn't Function When The App Is Started From the Command LIne


I encounter a few unreasonable issues with a Spring Shell app which has the dependency as

    <dependency>
        <groupId>org.springframework.shell</groupId>
        <artifactId>spring-shell-starter</artifactId>
        <version>2.1.0-SNAPSHOT</version>
    </dependency>

The availability of a command method works fine when the app is running inside of Intellij Idea, but not on a command line with

java -jar target/my-app.jar

Why?


Solution

  • Try using the latest GA version of Spring Shell instead of a SNAPSHOT:

    <dependency>
        <groupId>org.springframework.shell</groupId>
        <artifactId>spring-shell-starter</artifactId>
        <version>2.1.4</version>
    </dependency>