The Spring Boot CLI is a command line tool that can be used if you want to quickly prototype with Spring. It allows you to run Groovy scripts, which means that you have a familiar Java-like syntax, without so much boilerplate code.
Windows安装
下载压缩包
可以直接从spring官网下载:
环境配置
将文件解压到指定文件夹后,根据INSTALL.txt配置环境:
- 在环境变量中,将java版本配置到1.8;
- 新建环境变量SPRING_CLI_HOME,指向刚刚解压的文件夹(如:D:\dev-tools\plugin\spring-2.0.0.BUILD-SNAPSHOT),并将%SPRING_CLI_HOME%\bin添加到环境变量Path中。
验证
spring --version |
MacOS安装
安装
使用Homebrew可以直接安装到/usr/local/bin中: brew tap pivotal/tap
brew install springboot
安装好之后,命令spring会自动注册到shell中。