WebSocket + Spring boot simple application example
Hello everyone, Today we will learn how to develop a Simple Spring Boot chat application with WebSocket Why WebSocket? We already know traditional HTTP requests are unidirectional and heavy. But WebSocket is bi-directional. The initial connection is using HTTP, then this connection gets upgraded to a socket-based connection. This single connection is then used for all future communication. The WebSocket message data exchange is much lighter compared to HTTP Following technologies stack being used: Spring Boot 2.1.4.RELEASE Spring 5.1.6.RELEASE JDK 1.8 Eclipse Oxygen Bootstrap Thymeleaf WebSocket User Interface Project Structure Pom.xml[maven] <?xml version = "1.0" encoding = "UTF-8" ?> <project xmlns = "http://maven.apache.org/POM/4.0.0" xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation = "http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" >