From 6685d49faaa541faa3c5b68c81c9445c228ff6fa Mon Sep 17 00:00:00 2001 From: ningenMe Date: Mon, 20 Jun 2022 00:24:46 +0900 Subject: [PATCH 1/2] Harmonize Kotlin example See gh-31458 --- .../springapplication/applicationexit/MyApplication.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt index 8a9af9e30a..488273cb85 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt @@ -32,5 +32,5 @@ class MyApplication { } fun main(args: Array) { - SpringApplication.run(MyApplication::class.java, *args) -} \ No newline at end of file + exitProcess(SpringApplication.exit(SpringApplication.run(MyApplication::class.java, *args))) +} From 8b9579eeb7ba0bd52499510159e446ddbdb7b457 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Mon, 20 Jun 2022 10:33:34 +0200 Subject: [PATCH 2/2] Polish "Harmonize Kotlin example" See gh-31458 --- .../springapplication/applicationexit/MyApplication.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt index 488273cb85..ad7abfcce8 100644 --- a/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt +++ b/spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt @@ -21,6 +21,8 @@ import org.springframework.boot.SpringApplication import org.springframework.boot.autoconfigure.SpringBootApplication import org.springframework.context.annotation.Bean +import kotlin.system.exitProcess + @SpringBootApplication class MyApplication { @@ -32,5 +34,6 @@ class MyApplication { } fun main(args: Array) { - exitProcess(SpringApplication.exit(SpringApplication.run(MyApplication::class.java, *args))) + exitProcess(SpringApplication.exit( + SpringApplication.run(MyApplication::class.java, *args))) }