SHL-8 separate hello world example
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
package org.springframework.shell.commands;
|
||||
|
||||
import org.springframework.roo.shell.CliAvailabilityIndicator;
|
||||
import org.springframework.roo.shell.CliCommand;
|
||||
import org.springframework.roo.shell.CliOption;
|
||||
import org.springframework.roo.shell.CommandMarker;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class HelloWorldCommands implements CommandMarker {
|
||||
|
||||
|
||||
@CliAvailabilityIndicator({"hw help"})
|
||||
public boolean isCommandAvailable() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@CliCommand(value = "hw echo", help = "Print a hello world message")
|
||||
public void config(
|
||||
@CliOption(key = { "message" }, mandatory = true, help = "The hello world message") final String message) {
|
||||
System.out.println("Hello world " + message);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package org.springframework.shell.plugin;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan({"org.springframework.shell.commands", "org.springframework.shell.converters"})
|
||||
public class HelloWorldPlugin {
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user