Goodness me, thank you! I've been trying to get my WebSocket to work for days now, and this is the first tutorial I've found that actually works. The only thing that I thought was missing was an explanation on how to push messages from backend to frontend, like a scheduled ping sent every 5 seconds or something like that, but that was easy to figure out after I had gotten your program up and running. Again, thank you!!
@@CodeForgeYT Thanks for answering :) I'm learning websocket and I don't know if when you get the connection from the client to it, it secure like can be application like Telegrams, whatsapp, viber or so one This is what I mean by secure. You really explain well, you really should think about to make it for one specific user ;) ;)
@@jean-baptistedioli1692 Sure thing! In this video we are not touching security subject. To make it secure you should implement some authentication before establishing connection via web socket. You also should use secure version of the protocol (wss) using ssl and stuff like this. Hope it helps! Keep coding!
Hey! Thanks for feedback! I don't have any video how to deploy spring boot application on heroku but it sounds like a great idea! There is a lot of tutorials how to deploy spring boot service on heroku in the internet, check them out! Good luck!
bro if i have try to have a connection with websocket with have path that was not defined in spring api how can a spring api recognize the path request is not correct so that it have to through a 4040 error how to implement it bro
thanks for the video :) but the method handleTextMessage is getting called the number of times of sessions(if there are 5 sessions then the handleTextMessage is getting called 5 times).Any solution for this please.
@@CodeForgeYT thanks for the reply and right now my problem is if I want to perform some logic whenever the msg is triggered then iam unable to do it.... since the method is called multiple times my logic is also getting called multiple times.....hope you understood the problem and any solution for this would be highly appreciated thanks!
Change one string and could use any client without CORS error. webSocketHandlerRegistry.addHandler(getChatWebSocketHandler(), CHAT_ENDPOINT).setAllowedOrigins("localhost:4200");
@@andreymanaenko1638 Yeah its simple, but with this simple tutorial you can do something a bit more complex. E.g. Implementing security and stuff like that. This is a start point not the destination.
Thanks man! It's first tutorial where author speak english well :D.
I love to hear that! Thanks :D
Goodness me, thank you! I've been trying to get my WebSocket to work for days now, and this is the first tutorial I've found that actually works.
The only thing that I thought was missing was an explanation on how to push messages from backend to frontend, like a scheduled ping sent every 5 seconds or something like that, but that was easy to figure out after I had gotten your program up and running.
Again, thank you!!
Hey! I am glad that tutorial helped you!
wow this awesome, sir!
Cool! Happy you like it!
It helped me a lot, you is the best, thank you
Glad to hear it helped you!
Thanks for the tutorial, however I would like to know how messages are stored in the database ?
Thanks for this tutorial!
My pleasure!
Thanks for this tutorial. Please show us other dependencies you add in spring initializr.
You can find source code for this video in the description. Keep Coding!
Thanks 😊
Great tutorial ! It helped me a lot, thanks.
Cool to hear that! Happy to help.
Great video, also, can I save chat with all messages, like if i will restart application all chats will be removed, how can I avoid it?
It helped me a lot, thank you
Cool!
Awesome I appreciate it.
Hey! Glad you like it!
Thanks frome Senegal, how to make for chat only one user
hero :3
Glad you like it!
Hello
Thanks for the teaching :)
Do you also have it, to send a message to a specific user in a secure mode ?
Thanks for you answer :)
Hi! Thanks for feedback!
Currently I don't have such application and I am not planning to make one, but who knows.
What you mean by secure mode?
@@CodeForgeYT Thanks for answering :)
I'm learning websocket and I don't know if when you get the connection from the client to it, it secure like can be application like Telegrams, whatsapp, viber or so one
This is what I mean by secure.
You really explain well, you really should think about to make it for one specific user ;) ;)
@@jean-baptistedioli1692 Sure thing!
In this video we are not touching security subject.
To make it secure you should implement some authentication before establishing connection via web socket. You also should use secure version of the protocol (wss) using ssl and stuff like this.
Hope it helps! Keep coding!
Congrats for the video, I have a question, how I can deploy on Heroku, I tried but not successfully. Help me please.
Hey! Thanks for feedback! I don't have any video how to deploy spring boot application on heroku but it sounds like a great idea! There is a lot of tutorials how to deploy spring boot service on heroku in the internet, check them out! Good luck!
@@CodeForgeYT Yes, I know but I refer to this project in specific.
do you have a tutorial with the front end in react?
Yes I would like to create same application and make a tutorial using react, but right know i don't have microphone.
bro if i have try to have a connection with websocket with have path that was not defined in spring api how can a spring api recognize the path request is not correct so that it have to through a 4040 error how to implement it bro
Hello, Just one question, how does it actually work if your not using any Rest Controllers? Can you provide a version where it has Rest Controllers ?
It works because we are using WebSockets, you don't need rest
i am facing issue with stomp . u used ws end point
thanks for the video :) but the method handleTextMessage is getting called the number of times of sessions(if there are 5 sessions then the handleTextMessage is getting called 5 times).Any solution for this please.
Thanks for pointing it out. Right now I don't have time to investigate it. Is it problem with this solution or only your code?
@@CodeForgeYT thanks for the reply and right now my problem is if I want to perform some logic whenever the msg is triggered then iam unable to do it.... since the method is called multiple times my logic is also getting called multiple times.....hope you understood the problem and any solution for this would be highly appreciated thanks!
Change one string and could use any client without CORS error.
webSocketHandlerRegistry.addHandler(getChatWebSocketHandler(), CHAT_ENDPOINT).setAllowedOrigins("localhost:4200");
Where I can get the source code
I have uploaded code on GitHub you can find link in video description! :)
Do you send every message to everybody ? Not good idea.
Why it it not good idea, any arguments? It is not direct message chat, it is old school chat where each user can jump right into the conversation.
@@CodeForgeYT Too simple.
@@andreymanaenko1638 Yeah its simple, but with this simple tutorial you can do something a bit more complex. E.g. Implementing security and stuff like that. This is a start point not the destination.