WebSocketMessageBrokerConfigurer
public abstract class AbstractSessionWebSocketMessageBrokerConfigurer<S extends ExpiringSession> extends AbstractWebSocketMessageBrokerConfigurer {
@Override
public void configureWebSocketTransport(WebSocketTransportRegistration registration) {
registration.addDecoratorFactory(wsConnectHandlerDecoratorFactory());
}
static class SessionStompEndpointRegistry implements StompEndpointRegistry {
private final StompEndpointRegistry registry;
private final HandshakeInterceptor interceptor;
public SessionStompEndpointRegistry(StompEndpointRegistry registry,
HandshakeInterceptor interceptor) {
this.registry = registry;
this.interceptor = interceptor;
}
public StompWebSocketEndpointRegistration addEndpoint(String... paths) {
StompWebSocketEndpointRegistration endpoints = registry.addEndpoint(paths);
endpoints.addInterceptors(interceptor);
return endpoints;
}
}
registration.addDecoratorFactory(wsConnectHandlerDecoratorFactory());
а также endpoints.addInterceptors(interceptor);
который не существует. Как правильно написать?
1 ответ
Решение
Все эти функции доступны в последних версиях Spring Framework. Попробуйте использовать 4.1.3: http://spring.io/blog/2014/12/09/spring-framework-4-1-3-released