-
Notifications
You must be signed in to change notification settings - Fork 40.6k
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
Consider configuring UrlPathHelper with alwaysUseFullPath=true #21499
Comments
spring-projects-issues
added
the
status: waiting-for-triage
An issue we've not yet triaged
label
May 19, 2020
Actually it looks like since #13292, a |
bclozel
added
type: enhancement
A general enhancement
and removed
status: waiting-for-triage
An issue we've not yet triaged
labels
May 19, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
While working on spring-projects/spring-framework#25100 to optimize what
UrlPathHelper
does based on Servlet 4.0 runtime knowledge of the Servlet mapping type I realized that Spring Boot which I believe is aware of the DispatcherServlet mapping pattern, could use that knowledge to configureUrlPathHelper
withalwaysUseFullPath=true
.This can be done if the Servlet mapping is
"/"
, or"/*"
which avoids unnecessary overhead to determine the servletPath as described in the referenced issue, essentially the same benefit that Servlet 4.0 HttpServletMapping brings but based on Boot's knowledge of the Servlet mapping instead. The only Servlet mapping type for which the servletPath must be determined is where there is a path prefix, e.g."/myServlet/*"
which is less common.Keep in mind that
HttpServletMapping
is not supported everywhere, notably Jetty 9.x does not have Servlet 4.0 support, so this change should bring extra mileage there.The text was updated successfully, but these errors were encountered: