0

I have created application with spring boot and it has spring security & added code of websocket in spring boot application But I am not able to establish connection with websocket. I got an error when I'm trying to establish connection from front end.

WebSocket connection to 'wss://localhost:9595/chat' failed
CLOSED: wss://localhost:9595/chat
PramodA
  • 110
  • 2
  • 8
  • try url "ws" instead of "wss" wss should be used when you have secure connection. more here: https://stackoverflow.com/questions/46557485/difference-between-ws-and-wss Also when asking question you should give here an example of code you are using. There is a lot of implementations of websockets out there – Morph21 Apr 20 '22 at 10:24
  • @Szprota21 I have using secured connection So preferred wss. – PramodA Apr 20 '22 at 10:52
  • even if it's secured connection it's on localhost which isn't helping because is not resolvable ssl certificate. Anyway without any example here no one will be able to help you. You should post code for your ws client and ws server for it to be minimal reproducible example https://stackoverflow.com/help/minimal-reproducible-example – Morph21 Apr 20 '22 at 10:57

0 Answers0