0

I have a simple CLI application that prints out your name from the official docs here.

@ShellComponent
public class Cli {

 @ShellMethod("Say my name")
 public String hi(@ShellOption(value = {"name"}) String arg1){
    return "Hi " + arg1 + "!!";
 }
}

When I run hi --name Chandler i get Hi null!! What am I doing wrong?

Amos Machora
  • 486
  • 3
  • 12

1 Answers1

0

Can you make sure that the version of spring-shell you are using matches the documentation you are using?

Use the above code, with Spring Boot 3.0.0 and Spring Shell 3.0.0-M3 works as expected.

DaShaun
  • 3,722
  • 2
  • 27
  • 29