From bfce07894c61817563888ad0df47046d82aa770b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Furkan=20=C3=96ZBEK?= <68690056+ritzykey@users.noreply.github.com> Date: Mon, 19 Aug 2024 20:53:02 +0300 Subject: [PATCH 1/2] Harmonize web handler code sample See gh-41948 --- .../boot/docs/web/servlet/springmvc/MyUserHandler.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java index 404ef7a36082..9ed696e8812a 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java @@ -24,18 +24,15 @@ public class MyUserHandler { public ServerResponse getUser(ServerRequest request) { - /**/ - return ServerResponse.ok().build(); + /**/ return ServerResponse.ok().build(); } public ServerResponse getUserCustomers(ServerRequest request) { - /**/ - return ServerResponse.ok().build(); + /**/ return ServerResponse.ok().build(); } public ServerResponse deleteUser(ServerRequest request) { - /**/ - return ServerResponse.ok().build(); + /**/ return ServerResponse.ok().build(); } } From 8243c7ba98254c327931520ce3ae1f86c669441d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Nicoll?= Date: Tue, 20 Aug 2024 08:41:13 +0200 Subject: [PATCH 2/2] Polish "Harmonize web handler code sample" See gh-41948 --- .../boot/docs/web/servlet/springmvc/MyUserHandler.java | 2 +- .../boot/docs/web/reactive/webflux/MyUserHandler.kt | 8 ++++---- .../boot/docs/web/servlet/springmvc/MyUserHandler.kt | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java index 9ed696e8812a..15f04bcfd3a3 100644 --- a/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java +++ b/spring-boot-project/spring-boot-docs/src/main/java/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/MyUserHandler.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/MyUserHandler.kt index 1a768d9ef3cf..9131d9b01cb0 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/MyUserHandler.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/reactive/webflux/MyUserHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -26,15 +26,15 @@ import reactor.core.publisher.Mono class MyUserHandler { fun getUser(request: ServerRequest?): Mono { - return ServerResponse.ok().build() + /**/ return ServerResponse.ok().build() } fun getUserCustomers(request: ServerRequest?): Mono { - return ServerResponse.ok().build() + /**/ return ServerResponse.ok().build() } fun deleteUser(request: ServerRequest?): Mono { - return ServerResponse.ok().build() + /**/ return ServerResponse.ok().build() } } diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.kt index 9695030c97af..20ce4f5a3a4b 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/web/servlet/springmvc/MyUserHandler.kt @@ -1,5 +1,5 @@ /* - * Copyright 2012-2022 the original author or authors. + * Copyright 2012-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -25,15 +25,15 @@ import org.springframework.web.servlet.function.ServerResponse class MyUserHandler { fun getUser(request: ServerRequest?): ServerResponse { - return ServerResponse.ok().build() + /**/ return ServerResponse.ok().build() } fun getUserCustomers(request: ServerRequest?): ServerResponse { - return ServerResponse.ok().build() + /**/ return ServerResponse.ok().build() } fun deleteUser(request: ServerRequest?): ServerResponse { - return ServerResponse.ok().build() + /**/ return ServerResponse.ok().build() } }