public final class WebSocketRegistryListener implements ApplicationListener<ApplicationEvent> {
@Override
public void onApplicationEvent(ApplicationEvent event) {
if(event instanceof SessionDisconnectEvent) {
SessionDisconnectEvent e = (SessionDisconnectEvent) event;
Map<String, Object> sessionAttributes = SimpMessageHeaderAccessor.getSessionAttributes(e.getMessage().getHeaders());
}
}
}
e.getMessage()。getHeaders();這並不存在。如何編寫它是正確的?WebSocket RegistryListener
請! SomeBody幫我解決了這個非常緊急的問題。 – Olivia 2014-12-09 10:30:22