はじめに
Spring Boot CLI を使ってGroovyアプリを動かしてみようと思ったら
”Ruby Gem”の”Spring”に邪魔され、
Spring Boot CLIのコマンド”spring run”ができなかったので
解決策をメモしておきます。
解決策
- Spring Boot CLI用のパスを通す
.zshrc に以下の2行を追加
(お使いの環境にあわせて.zshrcは.bashrcなりに変換してください)
export SPRING_HOME=/Users/Y_h/spring-1.5.6.RELEASE
export PATH=$SPRING_HOME/bin/:$PATH
からの
```で変更を反映
2. Spring Boot CLIの動作確認
----
$ spring
とTerminalに入力し…
usage: spring [--help] [--version]
[]
Available commands are:
run [options] [--] [args]
Run a spring groovy script
test [options] [--] [args]
Run a spring groovy script test
grab
Download a spring groovy script's dependencies to ./repository
jar [options]
Create a self-contained executable jar file from a Spring Groovy script
war [options]
Create a self-contained executable war file from a Spring Groovy script
install [options]
Install dependencies to the lib/ext directory
uninstall [options]
Uninstall dependencies from the lib/ext directory
init [options] [location]
Initialize a new project using Spring Initializr (start.spring.io)
shell
Start a nested shell
Common options:
-d, --debug Verbose mode
Print additional status information for the command you are running
See 'spring help ' for more information on a specific command.
と表示されればOK
おつかれさま自分
# 最後に
インストールガイドをよく見れば書いてあることなんですが
はまってしまいました…