startApplication

inline fun <T : Any> startApplication(vararg args: String, initializer: Micronaut.() -> Unit = {}): ApplicationContext

Top level function acting as a Kotlin shortcut allowing to write startApplication<Foo>(args) { // Initializer function } instead of Micronaut.build(*args).mainClass(Foo::class.java).apply({ // Initializer }).start().

Return

The ApplicationContext

Author

Will Buck

Since

2.3.1

Parameters

T

The application class

args

The arguments

initializer

Some function you want to apply to the build