The following error occurred when Socket.js and stomp.js established the stomp endpoint

1. Question:

the following error occurred:

clipboard.png

public void registerStompEndpoints(StompEndpointRegistry stompEndpointRegistry) {
        log.info("stomp ... ... ... ");
        stompEndpointRegistry
                .addEndpoint("/chat")
                .addInterceptors(new CocoshakeInterceptor())
                ...
                }
Mar.12,2021

Please refer to this article: https://codeshelper.com/a/11.. The endPoint of
new SockJS (YOUR_END_POINT) must be the same as the endPoint you registered with websocket config.
registry.addEndpoint (YOUR_END_POINT). WithSockJS ();

Menu