SpringBoot Shell
1.怎加依赖
2.添加注解
org.springframework.boot spring-boot-starter-parent 1.5.8.RELEASE @ShellComponent public class MyCommands { @ShellMethod("Add two integers together.") public int add(int a, int b) { return a + b; } @ShellMethod("echo") public String echo(String msg) { return msg; } } org.springframework.shell spring-shell-starter 2.0.1.RELEASE