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

Consistent method selection for listeners and endpoint mappings [SPR-13654] #18230

Closed
spring-projects-issues opened this issue Nov 7, 2015 · 1 comment
Assignees
Labels
type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Nov 7, 2015

Juergen Hoeller opened SPR-13654 and commented

Historically, we have several meant-to-be analogous method selection algorithms across the core framework: e.g. for request mappings, message mappings, JMS listeners, event listeners. Since those do not share a common algorithm implementation, they have different treatment of corner cases, in particular in case of a proxy vs target class scenario.

Most importantly, for common handler methods, we perform our expensive findAnnotation lookup twice since we're not reusing the initial result that triggered the inclusion in the candidate method set. Aside from consistency in the codebase, this part is primarily about startup performance for applications with many registered components of different types.

Along with #18153 and #18226, this should get addressed for 4.2.3 as well.


Affects: 4.2.2

Issue Links:

Referenced from: commits bc7bcab

@spring-projects-issues
Copy link
Collaborator Author

Juergen Hoeller commented

This is now refactored into org.springframework.core.MethodIntrospector, delegated to by all post-processors with analogous lookup purposes. Our two HandlerMethodSelector variants both delegate to that generalized class now and are marked deprecated themselves.

Juergen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants