Specify the HandlerMapping#order in the websocket example

The order value has to be specified for the HandlerMapping
so that it will be ordered before the one that serves the static resource.
This commit is contained in:
Violeta Georgieva 2017-05-12 20:45:27 +03:00
parent f985f71daf
commit 7f616c216b
1 changed files with 1 additions and 0 deletions

View File

@ -238,6 +238,7 @@ public HandlerMapping webSocketMapping() {
map.put("/bar", new BarWebSocketHandler());
SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
mapping.setOrder(10);
mapping.setUrlMap(map);
return mapping;
}