I have switched to spring shell version 2. Consider I have a command accepting one argument:
@shellMethod
public void greet(@ShellOption String name){
System.out.println(String.format("Hello %s", name);
}
The behavior in case of entering greet --name Bakir
and greet Bakir
is the same. Meaning that the spring shell assigns Bakir to name
even if it is not specified by the user. In case there are multiple arguments and the user forgets to enter one switch in the right place (depending on the method's args list order) would lead to a silent error.
Is there any way to stop this kind of assignment in spring shell 2.x?