Files
Scott Frederick 34f78e42cd Update sample application. (#23)
* Update sample application.

* Bump CF Java Client version to 3.9.0.
2018-04-10 21:31:55 -04:00

20 lines
535 B
Groovy

// to run locally use:
// spring run hi-service.groovy
//
// to deploy to Cloud Foundry use:
// spring jar hi.jar hi-service.groovy
// cf push hi-service -p hi.jar
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
@RestController
class GreetingRestController {
@RequestMapping("/hi/{name}")
def hi(@PathVariable String name) {
[greeting: "Hello, " + name + "!"]
}
}