mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Polish MyBeanRegistrar Kotlin code sample
This commit is contained in:
+2
-2
@@ -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())
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user