Support "*" mapping in MockMvc filter registration

Prior to this commit, configuring a Servlet filter in MockMvc with a
defined mapping would only consider "/*" as a catch-all pattern.

This commit relaxes this rule by also accepting "*" mappings.

Closes gh-28041
This commit is contained in:
Chen Jianbin
2022-02-11 23:18:25 +08:00
committed by Brian Clozel
parent 31a62ff8ba
commit 4bf995fa8b
2 changed files with 6 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ public class MockMvcFilterDecoratorTests {
@Test
public void matchPathMappingAll() throws Exception {
assertFilterInvoked("/test", "/*");
assertFilterInvoked("/test", "*");
}
@Test