spring_reference/II. Getting started/10.2.2. Installation with G...

34 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 10.2.2. 使用GVM安装
GVMGroovy环境管理器可以用来管理多种不同版本的Groovy和Java二进制包包括Groovy自身和Spring Boot CLI。可以从[gvmtool.net](http://gvmtool.net/)获取`gvm`并使用以下命令安装Spring Boot
```shell
$ gvm install springboot
$ spring --version
Spring Boot v1.3.0.BUILD-SNAPSHOT
```
如果你正在为CLI开发新的特性并想轻松获取你刚构建的版本可以使用以下命令
```shell
$ gvm install springboot dev /path/to/spring-boot/spring-boot-cli/target/spring-boot-cli-1.3.0.BUILD-SNAPSHOT-bin/spring-1.3.0.BUILD-SNAPSHOT/
$ gvm use springboot dev
$ spring --version
Spring CLI v1.3.0.BUILD-SNAPSHOT
```
这将会在你的gvm仓库中安装一个名叫`dev`的本地`spring`实例。它指向你的目标构建位置所以每次你重新构建Spring Boot`spring`将会是最新的。
你可以通过以下命令来验证:
```shell
$ gvm ls springboot
================================================================================
Available Springboot Versions
================================================================================
> + dev
* 1.3.0.BUILD-SNAPSHOT
================================================================================
+ - local version
* - installed
> - currently in use
================================================================================
```