example:
val bean = applicationContext.getBean<TestRepositoryKt?>()
// or
val bean = applicationContext.getBeanOrNull<TestRepositoryKt>()
Comment From: sdeleuze
No, there is not on purpose because Kotlin extensions follow closely their Java counterparts which in that case throw a NoSuchBeanDefinitionException
when there is no such bean.