Я новичок в Стомп использовать весной загрузки 2.1.2.Отпустить. У меня есть мульти конечной точки и config в
ChannelInterceptor
, чтобы получить некоторую информацию.
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/endpoint1")
.addInterceptors(new IpHandshakeInterceptor())
.setAllowedOrigins(origin)
.withSockJS();
registry.addEndpoint("/endpoint2")
.addInterceptors(new IpHandshakeInterceptor())
.setAllowedOrigins(origin)
.withSockJS();
// other andpoint
}
@Override
public void configureClientInboundChannel(ChannelRegistration registration) {
registration.interceptors(myChannelInterceptor());
}
Любое использование
myChannelInterceptor
конечной точки(На самом деле, я хочу, конечная точка использует собственные ChannelInterceptor), я хочу делать вещи в
ChannelInterceptor
по пути к конечной точке.
@Override
public Message<?> preSend(Message<?> message, MessageChannel channel) {
if (endpoint.equals("endpoint1")) {
} else if (endpoint.equals("endpoint2")) {
}
}
Как я могу получить
endpoint
информация в
ChannelInterceptor
?