Skip to content

BeanFactory lacks method for getting bean by type with specified constructor arguments [SPR-11235] #15860

Closed
@spring-projects-issues

Description

@spring-projects-issues

Pavel Petrov opened SPR-11235 and commented

In BeanFactory interface we have only one option to create a prototype bean which has a constructor with arguments: Object getBean(String name, Object... args), which requires a type cast (it returns Object) and requires providing explicit name for a bean (even if there's a single implementation).

Could you please consider adding getBean(Class requiredType, Object... args) as well?


Issue Links:

Referenced from: commits fd5dbdd

2 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions