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: https://github.com/spring-projects/spring-integration/issues/3533.
Right I'm enforced to copy/paste a lot from Spring MVC to have a backward compatibility and implement a requested feature.
Thanks
Comment From: rstoyanchev
@artembilan do you still need this?
Comment From: artembilan
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
Comment From: jhoeller
Superseded by PR #32064.