Package-level declarations

Functions

Link copied to clipboard
inline fun <T> Micronaut.mainClass(): Micronaut

Extension for Micronaut.mainClass providing a mainClass<Foo>() variant.

Link copied to clipboard
inline fun <T : Throwable> Micronaut.mapError(noinline mapper: (T) -> Int): Micronaut

Extension for Micronaut.mapError providing a mapError<FooException>(mapper) variant.

Link copied to clipboard
inline fun <T> mnRun(vararg args: String): ApplicationContext

Top level function acting as a Kotlin shortcut allowing to write mnRun<Foo>(args) instead of Micronaut.run(Foo::class.java, *args).

Link copied to clipboard
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().