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

Allow for AbstractUrlHandlerMapping to add/remove handlers at runtime #26798

Closed
artembilan opened this issue Apr 13, 2021 · 3 comments
Closed
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) status: superseded An issue that has been superseded by another type: enhancement A general enhancement

Comments

@artembilan
Copy link
Member

The requirements is to be able to add and remove mappings for urls at runtime.

It is possible right now with the AbstractHandlerMethodMapping and its registerMapping(T mapping, Object handler, Method method) and unregisterMapping(T mapping) API.

It would be great if AbstractUrlHandlerMapping would make its protected void registerHandler(String urlPath, Object handler) throws BeansException, IllegalStateException { as public and also would introduce an unregisterHalder(String urlPath).

Related Spring Integration issue: spring-projects/spring-integration#3533.

Right I'm enforced to copy/paste a lot from Spring MVC to have a backward compatibility and implement a requested feature.

Thanks

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 13, 2021
@rstoyanchev rstoyanchev added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Nov 10, 2021
@rstoyanchev
Copy link
Contributor

@artembilan do you still need this?

@artembilan
Copy link
Member Author

Here is the class in Spring Integration I'm talking about: https://github.com/spring-projects/spring-integration/blob/main/spring-integration-websocket/src/main/java/org/springframework/integration/websocket/config/IntegrationDynamicWebSocketHandlerMapping.java.
So, yeah, if the API I'm asking would be there on the AbstractHandlerMethodMapping, I would be able to simplify that class or eliminate altogether.
Thanks

@rstoyanchev rstoyanchev added this to the 6.2.x milestone Nov 22, 2023
@rstoyanchev rstoyanchev added type: enhancement A general enhancement and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Nov 22, 2023
awmeinema added a commit to awmeinema/spring-framework that referenced this issue Jan 19, 2024
registerHandler to be public to make it possible to add handler at runtime.

Closes spring-projectsgh-26798
@jhoeller
Copy link
Contributor

jhoeller commented Feb 5, 2024

Superseded by PR #32064.

@jhoeller jhoeller closed this as completed Feb 5, 2024
@jhoeller jhoeller removed this from the 6.2.x milestone Feb 5, 2024
@jhoeller jhoeller added the status: superseded An issue that has been superseded by another label Feb 5, 2024
@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Apr 30, 2024
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) status: superseded An issue that has been superseded by another type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants