Skip to content

Functional Bean Definition DSL for noarg functions #23395

@juergenzimmermann

Description

@juergenzimmermann

Affects: 5.2.0.M3

When using the Kotlin-based Functional Bean Definition DSL I'm having a definition like this one:

val beans = beans {
    bean<CustomerService>()
    bean<CustomerHandler>()

    // 3 args resp. 1 arg
    bean(::router)    
    bean(::securityWebFilterChain)

    // userDetailsService has no args
    // bean(::userDetailsService) DOESN'T COMPILE
    bean { userDetailsService() }
}

For readability reasons it would be nice to also use a function reference when the bean function has no arguments.

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions