> `Routes(ref(), ref())` is the equivalent of `...
# spring
s
Routes(ref(), ref())
is the equivalent of
Routes(ref<UserHandler>(), ref<MessageSource>())
(types are not required thanks to Kotlin type inference) where
ref<UserHandler>()
is a shortcut for
applicationContext.getBean(UserHandler::class.java)
. We may provide an alternative syntax for autowiring classes by constructor which is pretty common in Koltin.