📅  最后修改于: 2022-03-11 14:52:11.592000             🧑  作者: Mango
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfigurer extends WebSocketMessageBrokerConfigurer {
@Override
public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
stompEndpointRegistry.addEndpoint("/ws").setAllowedOriginPatterns("*").withSockJS();
}
...
}