Polish MyBeanRegistrar Kotlin code sample

This commit is contained in:
Sébastien Deleuze
2025-10-28 10:05:24 +01:00
parent 618bce3bd8
commit 7e671abb9f
@@ -27,14 +27,14 @@ class MyBeanRegistrar : BeanRegistrarDsl({
prototype = true,
lazyInit = true,
description = "Custom description") {
Bar(bean<Foo>())
Bar(bean<Foo>()) // Also possible with Bar(bean())
}
profile("baz") {
registerBean { Baz("Hello World!") }
}
registerBean<MyRepository>()
registerBean {
myRouter(bean<MyRepository>()) // Also possible with just myRouter(bean())
myRouter(bean<MyRepository>()) // Also possible with myRouter(bean())
}
})