Skip to content

Instantly share code, notes, and snippets.

@JamesDaniel
Last active June 24, 2017 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JamesDaniel/a8f2d111a5c79bfb792f74637cdea8b1 to your computer and use it in GitHub Desktop.
Save JamesDaniel/a8f2d111a5c79bfb792f74637cdea8b1 to your computer and use it in GitHub Desktop.
spring-boot-groovy
@RestController
class ThisWillActuallyRun {
@RequestMapping("/")
String home() {
return "Hello World!"
}
}
@RestController
class ThisWillActuallyRunTwo {
@RequestMapping("/two")
String home() {
return "Hello World two!"
}
}
@RestController
class ThisWillActuallyRunThree {
@RequestMapping("/three")
String home() {
return "Hello World three!"
}
}
// From bash terminal run the following command:
// spring run app.groovy -- --server.port=9000
// To compile a jar:
// spring jar myapp.jar *.groovy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment