Skip to content

Commit a037ce1

Browse files
committed
Merge pull request #31458 from ningenMe
* pr/31458: Polish "Harmonize Kotlin example" Harmonize Kotlin example Closes gh-31458
2 parents cd38347 + 8b9579e commit a037ce1

File tree

1 file changed

+5
-2
lines changed
  • spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit

1 file changed

+5
-2
lines changed

spring-boot-project/spring-boot-docs/src/main/kotlin/org/springframework/boot/docs/features/springapplication/applicationexit/MyApplication.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ import org.springframework.boot.SpringApplication
2121
import org.springframework.boot.autoconfigure.SpringBootApplication
2222
import org.springframework.context.annotation.Bean
2323

24+
import kotlin.system.exitProcess
25+
2426
@SpringBootApplication
2527
class MyApplication {
2628

@@ -32,5 +34,6 @@ class MyApplication {
3234
}
3335

3436
fun main(args: Array<String>) {
35-
SpringApplication.run(MyApplication::class.java, *args)
36-
}
37+
exitProcess(SpringApplication.exit(
38+
SpringApplication.run(MyApplication::class.java, *args)))
39+
}

0 commit comments

Comments
 (0)