mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Since Kotlin extensions do not apply to static methods, this commit introduces a runApplication() Kotlin top level function that acts as a Kotlin shortcut for SpringApplication.run(). This shortcut avoids to require using non-idiomatic code like SpringApplication.run(FooApplication::class.java) and provides a runApplication<FooApplication>() alternative (as well as an array of KClass based alternative when multiple classes need to be passed as parameter). It is possible to customize the application with the following syntax: runApplication<FooApplication>() { setEnvironment(environment) } See gh-10511 |
||
---|---|---|
.. | ||
spring-boot | ||
spring-boot-actuator | ||
spring-boot-actuator-autoconfigure | ||
spring-boot-autoconfigure | ||
spring-boot-cli | ||
spring-boot-dependencies | ||
spring-boot-devtools | ||
spring-boot-docs | ||
spring-boot-parent | ||
spring-boot-starters | ||
spring-boot-test | ||
spring-boot-test-autoconfigure | ||
spring-boot-tools | ||
pom.xml |