- Notifications
You must be signed in to change notification settings - Fork0
This repository contains an example implementation of Server-Sent Events (SSE) using the Spring Boot framework.
License
robinhosz/SSE-With-SpringBoot
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
🌐 This repository contains an example implementation of Server-Sent Events (SSE) using the Spring Boot framework. SSE is a technology that enables a server to push asynchronous updates to a web client over a single, long-lived HTTP connection.
- 🖥️src/main/java/github/io/robinhosz/sse/controller/SSEController.java: This file contains the controller responsible for providing a continuous stream of SSE events to clients.
- 🛠️src/main/java/github/io/robinhosz/sse/service/SensorSimulatorService.java: Here lies the service that simulates sensor data generation at regular intervals.
- 📝src/main/java/github/io/robinhosz/sse/model/SensorData.java: This file defines the structure of sensor data.
- ✅src/test/java/github/io/robinhosz/sse/controller/SSEControllerTest.java: Contains unit tests for the SSE controller.
- ✅src/test/java/github/io/robinhosz/sse/service/SensorSimulatorServiceTest.java: Includes unit tests for the sensor data simulation service.
🛠️ Make sure you have Java JDK and Maven installed on your system.
📥 Clone this repository to your local machine.
git clone https://github.com/robinhosz/SSE-With-SpringBoot.git
⚙️ Navigate to the cloned directory and run the application using Maven:
cd sse-spring-bootmvn spring-boot:run🚀 The server will start and be available athttp://localhost:8080.
🌐Open a web browser and accesshttp://localhost:8080/events to see SSE events being continuously streamed.
This is a basic example and can be expanded to meet more complex SSE application requirements.
- 🤝 Feel free to submit pull requests with enhancements.
- 🐞 Report issues or suggest new features using the Issues tab.
About
This repository contains an example implementation of Server-Sent Events (SSE) using the Spring Boot framework.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.