Commit aa9ab8e
committed
Add support for callable references to BeanRegistrarDsl
BeanDefinitionDsl is allowing to create a bean from a callable
reference with its parameters autowired by type,
BeanRegistrarDsl should allow that too. For example:
class SampleBeanRegistrar : BeanRegistrarDsl({
registerBean<MyRepository>()
registerBean(::myRouter)
})
fun myRouter(myRepository: MyRepository) = router {
...
}
Closes gh-349221 parent 81ea754 commit aa9ab8e
File tree
2 files changed
+693
-0
lines changed- spring-beans/src/main/kotlin/org/springframework/beans/factory
- spring-context/src/test/kotlin/org/springframework/context/annotation
2 files changed
+693
-0
lines changed
0 commit comments