springboot中实现websocket,WebSocketMessageBrokerConfigurer 如何启动

maomao1127 发布于 2015/06/16 11:24
阅读 6K+
收藏 0
@Configuration 
@EnableWebSocketMessageBroker 
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer { 
@Override public void configureMessageBroker(MessageBrokerRegistry config) {
        config.setApplicationDestinationPrefixes("/app");
        config.enableSimpleBroker("/queue", "/topic");
    } @Override public void registerStompEndpoints(StompEndpointRegistry registry) {
        registry.addEndpoint("/portfolio").withSockJS();

    } // ... }


请问这个类在springboot中怎么启动呢

加载中
返回顶部
顶部