Last active
May 31, 2020 17:49
-
-
Save navichok26/8ba032343311f72dd9ff66520c17f54f to your computer and use it in GitHub Desktop.
WebSocketConfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@EnableWebSocketMessageBroker | |
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { | |
@Override | |
public void registerStompEndpoints(StompEndpointRegistry registry) { | |
registry.addEndpoint("/ws").withSockJS(); | |
} | |
@Override | |
public void configureMessageBroker(MessageBrokerRegistry registry) { | |
registry.setApplicationDestinationPrefixes("/app"); | |
registry.enableSimpleBroker("/topic"); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment