This commit makes several changes in both WebMvc.fn as well as
WebFlux.fn.
- ServerRequest now exposes a RequestPath through requestPath(), and
pathContainer() has been deprecated.
- The PathPredicate and PathResourceLookupFunction now respects this
RequestPath's pathInApplication() in their path-related
functionality.
- When nesting, the PathPredicate now appends the matched part of the
path to the current context path, instead of removing the matched
part (which was done previously). This has the same result: the
matched part is gone, but now the full path stays the same.
Closes gh-25270
@ -69,7 +68,7 @@ public final class MockServerRequest implements ServerRequest {
@@ -69,7 +68,7 @@ public final class MockServerRequest implements ServerRequest {
privatefinalURIuri;
privatefinalRequestPathpathContainer;
privatefinalRequestPathrequestPath;
privatefinalMockHeadersheaders;
@ -88,7 +87,7 @@ public final class MockServerRequest implements ServerRequest {
@@ -88,7 +87,7 @@ public final class MockServerRequest implements ServerRequest {
privatefinalWebSessionsession;
@Nullable
privatePrincipalprincipal;
privatefinalPrincipalprincipal;
@Nullable
privatefinalInetSocketAddressremoteAddress;
@ -111,7 +110,7 @@ public final class MockServerRequest implements ServerRequest {
@@ -111,7 +110,7 @@ public final class MockServerRequest implements ServerRequest {
@ -148,8 +147,8 @@ public final class MockServerRequest implements ServerRequest {
@@ -148,8 +147,8 @@ public final class MockServerRequest implements ServerRequest {
@ -249,7 +249,7 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -249,7 +249,7 @@ public class PathPattern implements Comparable<PathPattern> {
@ -262,15 +262,17 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -262,15 +262,17 @@ public class PathPattern implements Comparable<PathPattern> {
@ -592,20 +594,32 @@ public class PathPattern implements Comparable<PathPattern> {
@@ -592,20 +594,32 @@ public class PathPattern implements Comparable<PathPattern> {
@ -104,10 +105,16 @@ public class ServerRequestWrapper implements ServerRequest {
@@ -104,10 +105,16 @@ public class ServerRequestWrapper implements ServerRequest {