提交 7f616c21 编写于 作者: V Violeta Georgieva

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.
上级 f985f71d
...@@ -238,6 +238,7 @@ public HandlerMapping webSocketMapping() { ...@@ -238,6 +238,7 @@ public HandlerMapping webSocketMapping() {
map.put("/bar", new BarWebSocketHandler()); map.put("/bar", new BarWebSocketHandler());
SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping(); SimpleUrlHandlerMapping mapping = new SimpleUrlHandlerMapping();
mapping.setOrder(10);
mapping.setUrlMap(map); mapping.setUrlMap(map);
return mapping; return mapping;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册