Skip to content

Instantly share code, notes, and snippets.

@joshlong
Last active August 29, 2015 14:22
Show Gist options
  • Select an option

  • Save joshlong/626a7e0e7762c440f009 to your computer and use it in GitHub Desktop.

Select an option

Save joshlong/626a7e0e7762c440f009 to your computer and use it in GitHub Desktop.
a simple Spring Boot CLI program
// 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