Skip to content

Instantly share code, notes, and snippets.

@DASAR-zz
Created July 28, 2016 11:28
Show Gist options
  • Save DASAR-zz/daebb98eb05a89910650d5e53486dd38 to your computer and use it in GitHub Desktop.
Save DASAR-zz/daebb98eb05a89910650d5e53486dd38 to your computer and use it in GitHub Desktop.
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
@Override
public void configureMessageBroker(MessageBrokerRegistry config) {
config.enableSimpleBroker("/topic");
config.setApplicationDestinationPrefixes("/app");
}
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/hello").withSockJS();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment