Skip to content

Add support for callable references to BeanRegistrarDsl #34922

Closed
@sdeleuze

Description

@sdeleuze

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 {
    ...
}

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)theme: kotlinAn issue related to Kotlin supporttype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions