Spring shell command line application returning null from a shell method

Viewed 15

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?

0 Answers
Related