In the world of web development, real-time communication between a server and its clients is crucial.
This brings us to SSE is a standard that allows a server to push updates to a client whenever there’s new data available.
In this project, I have implemented a simple example that provides updates about the current temperature, humidity, and wind speed of the weather. These updates are sent to the client every second.
- Spring WebFlux
- Lombok
- EndPoint
- Model
- Service
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>