Skip to content

Instantly share code, notes, and snippets.

@igorlukanin
Created November 2, 2017 13:24
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 igorlukanin/3c16cde6ea711a77978a44c9fd96a43b to your computer and use it in GitHub Desktop.
Save igorlukanin/3c16cde6ea711a77978a44c9fd96a43b to your computer and use it in GitHub Desktop.
@RestController
class GreetingController {
val counter = AtomicLong()
@GetMapping("/greeting")
fun greeting(@RequestParam(value = "name", defaultValue = "World") name: String) =
Greeting(counter.incrementAndGet(), "Hello, $name")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment