SpringBoot Shell


1.怎加依赖
2.添加注解


<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>1.5.8.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <dependency> <groupId>org.springframework.shell</groupId> <artifactId>spring-shell-starter</artifactId> <version>2.0.1.RELEASE</version> </dependency> @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; } }

 

上一篇:MySql中的driverClassName、url


下一篇:Flink实战(124):connector(二十一)hbase 读写 (二)