A whole Spring application in a tweet

@RestController
class HelloWorld {

@RequestMapping("/")
def hi(){
return "hello"
}
}

Automatically creates an embedded Tomcat web-server and uses Spring MVC when run on a command line:

spring run application.groovy

localhost:8080 gives:

hello

*mind blown*

 

Leave a comment