mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-25 08:19:01 +00:00
Add trailing slash support to AbstractUrlHandlerMapping
Issue: SPR-12818
This commit is contained in:
+5
@@ -110,6 +110,11 @@ public class SimpleUrlHandlerMappingTests {
|
||||
assertTrue("Handler is correct bean", hec != null && hec.getHandler() == otherBean);
|
||||
assertEquals("welcome.x", req.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE));
|
||||
|
||||
req = new MockHttpServletRequest("GET", "/welcome/");
|
||||
hec = getHandler(hm, req);
|
||||
assertTrue("Handler is correct bean", hec != null && hec.getHandler() == otherBean);
|
||||
assertEquals("welcome", req.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE));
|
||||
|
||||
req = new MockHttpServletRequest("GET", "/");
|
||||
req.setServletPath("/welcome.html");
|
||||
hec = getHandler(hm, req);
|
||||
|
||||
Reference in New Issue
Block a user