Spring Boot Websocket聊天應用示例Java技術員



該視頻向您介紹了如何使用Spring Boot和Web Socket構建聊天應用程序

#JavaTechie #SpringBoot #WebSocket

的GitHub:
https://github.com/Java-Techie-jt/Spring-Boot-WebSocket

博客:
https://javagyanmantra.wixsite.com/website

臉書:
https://www.facebook.com/groups/919464521471923

大家喜歡的視頻,請立即訂閱,然後按一下響鈴圖標,不要錯過Java Techie的任何更新。

30 comments
  1. this code import eclipse error show package com.javatechie.spring.ws.api;

    import org.springframework.boot.SpringApplication;
    import org.springframework.boot.autoconfigure.SpringBootApplication;

    @SpringBootApplication
    public class SpringBootWebsocketApplication {

    public static void main(String[] args) {
    SpringApplication.run(SpringBootWebsocketApplication.class, args);
    }

    }
    pls help me and how to resolve this

  2. hello thanks for the tutorial, but I have a small problem, my model is called Message but when I make the request I get the following error:

    org.springframework.messaging.converter.MessageConversionException: Unable to convert payload with type='com.sockets.socket.model.Message', contentType='null'

    I hope you can help me, thanks.

  3. Thank's you a lot bro. I want to ask if your code can evolve into a chat application with data base similar to a complete application like telegram.
    Of course not completely complete, just can grow up 🙂

  4. Good job! Thank you so much for sharing. How can I send private messages for only one user and not to all? There is an anotation called @SendToUser but … Can you to do a video whit it?

  5. This is awesome and better than certain expensive industry-standard courses out there. Well done. I shall definitely subscribe.

  6. Before sending data to websocket can i read the data from external broker (rabbit mq) and doing the modification and I needs to sent the data to socket

  7. Java Techie: Good one.
    Add this below code in main.js, to get detail of user who left main chat, when browser window is closed, or refreshed.

    window.addEventListener("beforeunload", function (e) {

    var confirmationMessage = "o/";

    stompClient.send("/app/chat.register",

    {},

    JSON.stringify({sender: username, type: 'LEAVE'})

    )

    (e || window.event).returnValue = confirmationMessage;

    return confirmationMessage;

    });

Comments are closed.