Commit 53afbbe2 authored by Brian Clozel's avatar Brian Clozel

Update RouteMatcher configuration for RSocket

This commit updates the `RouteMatcher` configuration after the latest
Spring Framework changes. The default route matcher implementation based
on the `PathPattern` infrastructure is now tailored for the messaging
use case (path separator, path encoding options and trailing separator).

See spring-projects/spring-framework#23310
parent a1f32bbd
......@@ -29,7 +29,6 @@ import org.springframework.messaging.rsocket.RSocketRequester;
import org.springframework.messaging.rsocket.RSocketStrategies;
import org.springframework.messaging.rsocket.annotation.support.RSocketMessageHandler;
import org.springframework.util.ClassUtils;
import org.springframework.web.util.pattern.PathPatternParser;
import org.springframework.web.util.pattern.PathPatternRouteMatcher;
/**
......@@ -52,9 +51,7 @@ public class RSocketMessagingAutoConfiguration {
RSocketMessageHandler messageHandler = new RSocketMessageHandler();
messageHandler.setRSocketStrategies(rSocketStrategies);
if (ClassUtils.isPresent(PATHPATTERN_ROUTEMATCHER_CLASS, null)) {
PathPatternParser parser = new PathPatternParser();
parser.setSeparator('.');
messageHandler.setRouteMatcher(new PathPatternRouteMatcher(parser));
messageHandler.setRouteMatcher(new PathPatternRouteMatcher());
}
return messageHandler;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment