Skip to content

ObjectFactory lacks method for getting bean with specified constructor arguments [SPR-13956] #18529

Closed
@spring-projects-issues

Description

@spring-projects-issues

Frank Scheffler opened SPR-13956 and commented

While BeanFactory supports retrieving prototyped beans with additional constructor or factory-method arguments (#15860), the org.springframework.beans.factory.ObjectFactory is still missing such method.

ObjectFactory is often used in test fixtures, where lookup-method injection et.al. cannot be used, in order to get access to prototype bean instance. Using the BeanFactory directly in such cases is currently the only way to solve this.


Affects: 4.2.4

Issue Links:

Referenced from: commits ed98393, 890819f

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions