Skip to content

Commit

Permalink
Update RouteMatcher configuration for RSocket
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bclozel committed Jul 22, 2019
1 parent a1f32bb commit 53afbbe
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
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;

/**
Expand All @@ -52,9 +51,7 @@ public RSocketMessageHandler messageHandler(RSocketStrategies rSocketStrategies)
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;
}
Expand Down

0 comments on commit 53afbbe

Please sign in to comment.