WebSockets demo using Spring Boot
WebSockets demo application using Spring Boot
Demo is working but it’s still in progress
It allow you to send echo messages to:
Also you can login as normal user or as administrator
Only administrator can send messages to ‘admin’ topic
mvn spring-boot:run
On a home page you will see something like this:
Switch “Connect as admin” allows you to choose STOMP endpoints:
“Connect” button allows you to create socket connection
“Disconnect” button used to destroy connection
After pressing connect button browser will ask you for credentials
Default user credentials are:
After that you can send echo messages to different topics (user, session, all, admin)
Received messages will be shown in the table “Messages”
Message template is: “date-time” “username”: “message_text”
https://spring.io/guides/gs/messaging-stomp-websocket
https://en.wikipedia.org/wiki/Streaming_Text_Oriented_Messaging_Protocol
https://www.baeldung.com/spring-security-websockets
https://www.baeldung.com/spring-websockets-sendtouser
http://jmesnil.net/stomp-websocket/doc/
https://docs.spring.io/spring-security/site/docs/5.2.x/reference/html/web-app-security.html#websocket