Using WebSocket to build an interactive web application
What is websocket ?
The WebSocket API is an advanced technology that makes it possible to open a two-way interactive communication session between the user’s browser and a server. With this API, you can send messages to a server and receive event-driven responses without having to poll the server for a reply.
This guid will build a server that accepts a message that carries a user’s name. In response, the server will push a greeting into a queue to which the client is subscribed.
-
Starting with Spring Initializr
-
Adding Dependencies
-
Create a Resource Representation Class
-
Create a Message-handling Controller
-
Configure Spring for STOMP messaging
-
Create a Browser Client
- Make the Application Executable
- Build an executable JAR
- Test the service