Empty path mapping behaves consistently
An empty path mapping in an @RequestMapping now consistently matches to empty paths regardless of whether there are both type and method level, annotations, or method-level only. Closes gh-22543
This commit is contained in:
@@ -63,6 +63,7 @@ public final class MockMvcWebConnection implements WebConnection {
|
||||
|
||||
private final MockMvc mockMvc;
|
||||
|
||||
@Nullable
|
||||
private final String contextPath;
|
||||
|
||||
private WebClient webClient;
|
||||
@@ -91,7 +92,7 @@ public final class MockMvcWebConnection implements WebConnection {
|
||||
* @param webClient the {@link WebClient} to use (never {@code null})
|
||||
* @param contextPath the contextPath to use
|
||||
*/
|
||||
public MockMvcWebConnection(MockMvc mockMvc, WebClient webClient, String contextPath) {
|
||||
public MockMvcWebConnection(MockMvc mockMvc, WebClient webClient, @Nullable String contextPath) {
|
||||
Assert.notNull(mockMvc, "MockMvc must not be null");
|
||||
Assert.notNull(webClient, "WebClient must not be null");
|
||||
validateContextPath(contextPath);
|
||||
|
||||
Reference in New Issue
Block a user