1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

sdkman の使い方

Last updated at Posted at 2020-01-11
  1. インストール

参考ページ
Installation

curl -s "https://get.sdkman.io" | bash
source "$HOME/.sdkman/bin/sdkman-init.sh"

インストールの確認

$ sdk version

SDKMAN 5.7.4+362
  1. springboot のインストール
sdk install springboot

インストールの確認

$ spring --version
Spring CLI v2.2.2.RELEASE

サンプルのプログラム

app.groovy
@Controller
class ThisWillActuallyRun {

    @RequestMapping("/")
    @ResponseBody
    String home() {
        String str_aa = "*** start ***<p />"
        str_aa += "Hello<p />"
        str_aa += "*** end ***<p />" 
        return str_aa
    }

}

実行

spring run app.groovy

クライアントでアクセス

curl http://localhost:8080

ポートを変更して実行する方法

spring run app.groovy -- --server.port=9000

クライアントでアクセス

curl http://localhost:9000
  1. Gradle のインストール
sdk install gradle

インストールの確認

$ gradle -version

------------------------------------------------------------
Gradle 6.0.1
------------------------------------------------------------

Build time:   2019-11-18 20:25:01 UTC
Revision:     fad121066a68c4701acd362daf4287a7c309a0f5

Kotlin:       1.3.50
Groovy:       2.5.8
Ant:          Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM:          13.0.1 (Oracle Corporation 13.0.1+9)
OS:           Linux 5.4.10-arch1-1 amd64
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?