This project extends the official websocket demo at https://spring.io/guides/gs/messaging-stomp-websocket by adding CORS permission and an Angular v21 websocket client.
This project contains two sub-projects:
ws-server
ws-client
Run the ws-server using:
.\gradlew bootRun
then run the ws-client using:
ng serve
Accessing http://localhost:4200/demo should give a response like:
demo works!
[ << inputbox >> ][Send]
Response:
=> Client message => Orange
===> Server message => You said: Orange!
=> Client message => Apple
===> Server message => You said: Apple!