Skip to content
This repository has been archived by the owner on Jan 22, 2024. It is now read-only.

implements kotlin language feature #115

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class GreetingController {
val counter = AtomicLong()

@GetMapping("/greeting")
fun greeting(@RequestParam(value = "name", defaultValue = "World") name: String) =
Greeting(counter.incrementAndGet(), "Hello, $name")
fun greeting(@RequestParam name: String?) =
Greeting(counter.incrementAndGet(), "Hello, ${name ?: "World"}")

}
}