Adapt MyBeanRegistrar Kotlin code sample

This commit adapts the MyBeanRegistrar Kotlin code sample to use a
lambda supplier instead of a callable reference since this capability
has been removed.

See gh-35549
Closes gh-35694
This commit is contained in:
Sébastien Deleuze
2025-10-28 09:45:34 +01:00
parent 4356fc11e1
commit 618bce3bd8
@@ -33,7 +33,9 @@ class MyBeanRegistrar : BeanRegistrarDsl({
registerBean { Baz("Hello World!") }
}
registerBean<MyRepository>()
registerBean(::myRouter)
registerBean {
myRouter(bean<MyRepository>()) // Also possible with just myRouter(bean())
}
})
fun myRouter(myRepository: MyRepository) = router {