Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

javadoc: remove a comment documented a limitation on @Lookup annotation #25044

Closed
wants to merge 1 commit into from
Closed

javadoc: remove a comment documented a limitation on @Lookup annotation #25044

wants to merge 1 commit into from

Conversation

urisimchoni
Copy link

The documentation on @lookup annotation reads:

When used with component scanning or any other mechanism that filters out abstract
beans, provide stub implementations of your lookup methods to be able to declare
them as concrete classes.

However it looks like it's possible to define an abstract class, annotated with @component, with an abstract @Lookup-annotated method, and have Spring replace it with a concrete implementation. So this limitation doesn't seem to hold any longer.

@lookup method

Spring can dynamically override an abstract @Lookup-annotated method
to create a concrete class backing a bean, and this works with beans defined by @component
annotation.
@pivotal-issuemaster
Copy link

@urisimchoni Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label May 10, 2020
@pivotal-issuemaster
Copy link

@urisimchoni Thank you for signing the Contributor License Agreement!

@quaff
Copy link
Contributor

quaff commented May 11, 2020

Confirmed.

@jhoeller jhoeller added in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels May 11, 2020
@jhoeller jhoeller added this to the 5.2.7 milestone May 11, 2020
@jhoeller jhoeller self-assigned this May 18, 2020
@jhoeller
Copy link
Contributor

I've revised the section a bit differently, turning it into recommendations and still referring to potential use of stub methods - but not in the context of component scanning anymore, good catch there! And thanks for the pull request, in any case...

@jhoeller jhoeller closed this in 35f3277 May 18, 2020
@urisimchoni urisimchoni deleted the javadoc-lookup-annotation-fix branch May 18, 2020 17:11
FelixFly pushed a commit to FelixFly/spring-framework that referenced this pull request Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core Issues in core modules (aop, beans, core, context, expression) type: documentation A documentation task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants