GroovyでHello, world!
- Spring Boot CLIをinstall
$ brew tap pivotal/tap
$ brew install springboot
Installを確認する
$ spring --version Spring CLI v2.1.3.RELEASE
- プロジェクトを作成 hello.groovy
@RestController class hello { @RequestMapping("/") def home() { "Hello, world!" } }
- 実行
groovyを実行
$ spring run hello.groovy
リクエスト
$ curl localhost:8080 Hello, world!
おわり