Skip to content

@Lookup doesn't work in case of AbstractBeanFactory's cacheBeanMetadata=false #25749

Closed
@aliaksandr-budnikau

Description

@aliaksandr-budnikau

HI! I came across the use case when I wanted to create some provider with @lookup but when our BeanFactory has cacheBeanMetadata = false, Spring can't create a proxy for the provider and then @lookup doesn't work.

Here is my unit test for ease reproduction https://github.com/aliaksandr-budnikau/Lookup-annotation-bug/blob/master/src/test/java/org/example/MyComponentProviderTest.java

Thanks,
Alex

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