diff --git a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt b/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt index 30428eb4ab..a350a8a330 100644 --- a/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt +++ b/tutorials/spring-boot-restful/src/main/kotlin/org/jetbrains/kotlin/demo/GreetingController.kt @@ -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"}") -} \ No newline at end of file +}