getProperty

fun <T : Any> ApplicationCall.getProperty(key: String): T?
fun <T : Any> Application.getProperty(key: String): T?
fun <T : Any> Route.getProperty(key: String): T?
fun <T : Any> Routing.getProperty(key: String): T?

Retrieve given property for KoinComponent

Parameters

key
  • key property


fun ApplicationCall.getProperty(key: String, defaultValue: String): String
fun Application.getProperty(key: String, defaultValue: String): String
fun Route.getProperty(key: String, defaultValue: String): String
inline fun <T> Routing.getProperty(key: String, defaultValue: T): T

Retrieve given property for KoinComponent give a default value if property is missing

Parameters

key
  • key property

defaultValue
  • default value if property is missing