spring shell

使用Spring Shell 快速开发自己的命令交互窗口

强颜欢笑 提交于 2020-08-15 21:52:43
Spring Shell 有时候,为了方便开发和测试服务器,并不需要一个漂亮的用户界面,使用一个简单的命令窗口即可。如下所示: 这里介绍一个快速,方便,易用,简单的交互式命令窗口开发组件-Spring Shell 没错,又是spring 生态中的。 源码地址 https://gitee.com/wgslucky/spring-shell-demo 创建项目 本项目是使用Eclipse作为开发的IDE,同样,直接导入到Idea之中也可以使用。使用的JDK需要是1.8或更高的版本,我测试过在JDK11上也可以使用。 在eclipse中创建maven项目:spring-shell-demo,然后在pom.xml中添加如下依赖: <parent> <!-- 添加spring boot 父pom依赖,这个不能少,spring shell官方的文档中没有写 --> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.2.6.RELEASE</version> </parent> <dependencies> <dependency> <groupId>org.springframework.boot</groupId>