Unregister display in HandlerMapping

I am trying to write my own class HandlerMapping. To do this, I expanded the class AbstractUrlHandlerMapping. To register the mappings, I use the method registerHandler. Is there an easy way to unregister when the application starts? AbstractUrlHandlerMappingUnfortunately, it does not provide any public method for this.

I found a ticket [SPR-11541] that covers the specified function, but I cannot find an implementation.

+4
source share
2 answers

, , , : ( "stuff/**" ) , , HttpServletRequest getRequestURL() , .

RequestMapping("/stuf/**")
public String test(HttpServletRequest request)
{
   StringBuffer requestURL = request.getRequestURL();
   // Do whatever you want with the url now
}
0

Source: https://habr.com/ru/post/1655436/


All Articles