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.
HandlerMapping
AbstractUrlHandlerMapping
registerHandler
I found a ticket [SPR-11541] that covers the specified function, but I cannot find an implementation.
Introduced in Spring 4.2, as indicated here (fifth marker point)
, unregisterMapping http://docs.spring.io/spring/docs/4.1.9.RELEASE/javadoc-api/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.html
unregisterMapping
http://docs.spring.io/spring/docs/4.2.0.RELEASE/javadoc-api/org/springframework/web/servlet/handler/AbstractHandlerMethodMapping.html#unregisterMapping-T-
?
, , , : ( "stuff/**" ) , , HttpServletRequest getRequestURL() , .
RequestMapping("/stuf/**") public String test(HttpServletRequest request) { StringBuffer requestURL = request.getRequestURL(); // Do whatever you want with the url now }
Source: https://habr.com/ru/post/1655436/More articles:PHP - generate functions from an array of strings - phpAdding two animations to one object [To image] - cssGoogle API endpoints using the Javascript client library as an Angular 2 service - javascriptImport gapi.auth2 into angular 2 typescript - angularcontroller: ctrlfmt Poorly formed controller string. '' Must match `__name__ as __id__` or` __name__` - angularjsCalculating a quantile from grouped data in a Dataframe spark box - apache-sparkbest way to automatically load a node / client puppet - puppetIs there any overhead for writing a library in Kotlin for Android? - androidSpecify the height and width of the ggplot plot in the output of Rmarkdown knitr - rAre methods class instances that consume a lot of memory (in Scala)? - pythonAll Articles