add version info
This commit is contained in:
@@ -10,13 +10,13 @@ import org.springframework.stereotype.Component;
|
||||
public class HelloWorldCommands implements CommandMarker {
|
||||
|
||||
|
||||
@CliAvailabilityIndicator({"hw help"})
|
||||
@CliAvailabilityIndicator({"hw echo"})
|
||||
public boolean isCommandAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@CliCommand(value = "hw-echo", help = "Print a hello world message")
|
||||
public void config(
|
||||
@CliCommand(value = "hw echo", help = "Print a hello world message")
|
||||
public void hello(
|
||||
@CliOption(key = { "message" }, mandatory = true, help = "The hello world message") final String message,
|
||||
@CliOption(key = { "name1"}, mandatory = true, help = "The hello world name1 ") final String name1,
|
||||
@CliOption(key = { "name2","name22" }, mandatory = true, help = "The hello world name2 ") final String name2,
|
||||
@@ -25,4 +25,26 @@ public class HelloWorldCommands implements CommandMarker {
|
||||
System.out.println("Hello world " + message + ", name1: " + name1 +
|
||||
", name2:" + name2 + ". time:" + time + ".location: " + location);
|
||||
}
|
||||
|
||||
@CliCommand(value = "hw auto", help = "Print a hello world message")
|
||||
public void autao(
|
||||
@CliOption(key = { "message" }, mandatory = true, help = "The hello world message") final MessageType message){
|
||||
System.out.println("Hello world " + message);
|
||||
}
|
||||
|
||||
enum MessageType {
|
||||
Type1("type1"),
|
||||
Type2("type2"),
|
||||
Type3("type3");
|
||||
|
||||
private String type;
|
||||
|
||||
private MessageType(String type){
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType(){
|
||||
return type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user