Home java io.netty.handler.codec.DecoderException: java.lang.illegAlarGumexEption

io.netty.handler.codec.DecoderException: java.lang.illegAlarGumexEption




wrote online chat https://github.com/callicoder/spring- Boot-WebSocket-Chat-Demo

And I want to rewrite the ConfigureMessageBroker method to access another server.

@ override
  Public Void ConfigureMessageBroker (MessageBrokerRegistry Registry) {
    Registry.EnablestompbrokerRelay ("/ Topic"). SetRelayHost ("Localhost"). Setrelayport (3000);
    Registry.setApplicationDestInationPrefixes ("/ app");

But the error occurs

io.netty.handler.codec.decoderException: java.lang.illegAlarGumentException: no enum constant org.springframework.messaging.simp.stomp.stompcommand.http / 1.1 400 Bad Request

Answer 1

Try in WebsocketConfig class in the RegisterStompendPoint method (…) Add line

registry.setallowedorigins ("*");

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions