Avoid repeated calls to getPathWithinApplication from UrlPathHelper.getLookupPathForRequest #25669
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
type: enhancement
A general enhancement
Milestone
After looking at:

I think an easy optimisation exists
UrlPathHelper.getLookupPathForRequest(HttpServletRequest)
.I notice that it calls
getPathWithinServletMapping
which callsgetPathWithinApplication
, later it decides it is not happy with the result and so callsgetPathWithinApplication
again.I suspect it should be easy enough to change
getLookupPathForRequest
to first callgetPathWithinApplication
then pass that intogetPathWithinServletMapping
, if that doesn't return a satisfactory result return the already computed value of:getPathWithinApplication
The text was updated successfully, but these errors were encountered: