Allow to customize separator for messaging destinations
In order to be able to use separators like "." (used by default by most broker relays) instead of "/" for destination patterns handling, the PathMatcher used in spring-messaging can now be customized easily thanks to XML websocket namespace or JavaConfig. AntPathMatcher has been updated in order to use the configured path separator instead of an hardcoded "/" for path concatenation. Extension handling is now disabled when the "." separator is configured. Issue: SPR-11660
This commit is contained in:
committed by
Rossen Stoyanchev
parent
b676c41805
commit
928a466b5d
@@ -606,4 +606,10 @@ public class AntPathMatcherTests {
|
||||
assertTrue(pathMatcher.stringMatcherCache.isEmpty());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void noExtensionHandlingWithDotSeparator() {
|
||||
pathMatcher.setPathSeparator(".");
|
||||
assertEquals("/*.html.hotel.*", pathMatcher.combine("/*.html", "hotel.*"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user