2015-03-15 14:42:28 +00:00
|
|
|
|
### 10.2.2. 使用GVM安装
|
|
|
|
|
|
2015-05-15 02:13:30 +00:00
|
|
|
|
GVM(Groovy环境管理器)可以用来管理多种不同版本的Groovy和Java二进制包,包括Groovy自身和Spring Boot CLI。可以从[gvmtool.net](http://gvmtool.net/)获取gvm,并使用以下命令安装Spring Boot:
|
2015-03-15 14:42:28 +00:00
|
|
|
|
```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
|
|
|
|
|
```
|
2015-05-15 02:13:30 +00:00
|
|
|
|
这将会在你的gvm仓库中安装一个名叫dev的本地spring实例。它指向你的目标构建位置,所以每次你重新构建Spring Boot,spring将会是最新的。
|
2015-03-15 14:42:28 +00:00
|
|
|
|
|
|
|
|
|
你可以通过以下命令来验证:
|
|
|
|
|
```shell
|
|
|
|
|
$ gvm ls springboot
|
|
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
|
Available Springboot Versions
|
|
|
|
|
================================================================================
|
|
|
|
|
> + dev
|
|
|
|
|
* 1.3.0.BUILD-SNAPSHOT
|
|
|
|
|
|
|
|
|
|
================================================================================
|
|
|
|
|
+ - local version
|
|
|
|
|
* - installed
|
|
|
|
|
> - currently in use
|
|
|
|
|
================================================================================
|
|
|
|
|
```
|