Last active
August 29, 2015 14:22
-
-
Save joshlong/626a7e0e7762c440f009 to your computer and use it in GitHub Desktop.
a simple Spring Boot CLI program
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // put the following in a script (hi.groovy) | |
| @RestController | |
| class GreetingRestController { | |
| @RequestMapping("/hi/{n}") | |
| def hi(@PathVariable String n){ | |
| [ greeting : "Hello, " + n +"!" ] | |
| } | |
| } | |
| // then on the shell run the following | |
| //> brew tap pivotal/tap | |
| //> brew install springboot | |
| //> spring run hi.groovy |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment