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

Resolve new package cycle between web.servlet.handler and web.servlet.function #33381

Closed
jhoeller opened this issue Aug 13, 2024 · 2 comments
Closed
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Milestone

Comments

@jhoeller
Copy link
Contributor

#32689 introduced an instanceof HandlerFunction check in AbstractHandlerMethodExceptionResolver which creates a package cycle between org.springframework.web.servlet.handler and org.springframework.web.servlet.function(.support). Since this is just for identification and not making use of the actual HandlerFunction interface itself, we could detect a marker interface instead - implemented by HandlerFunction but living in the org.springframework.web.servlet parent package - or use an annotation to identify such pass-through handler objects that are supported next to HandlerMethod instances in AbstractHandlerMethodExceptionResolver.

@jhoeller jhoeller added in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task labels Aug 13, 2024
@jhoeller jhoeller added this to the 6.2.0-RC1 milestone Aug 13, 2024
@simonbasle
Copy link
Contributor

For the second approach, I wonder if @FunctionalInterface would be a fit 🤔 wdyt @jhoeller?

@jhoeller jhoeller self-assigned this Sep 10, 2024
@jhoeller
Copy link
Contributor Author

It looks like we can simply move the original instanceof HandlerFunction check down to ExceptionHandlerExceptionResolver which lives in the web.servlet.mvc rather than the web.servlet.handler package, being able to refer to web.servlet.function as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants