springsse demo
  • Java 54%
  • TypeScript 23.3%
  • HTML 12.5%
  • CSS 10.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Ralph Schaer 0440cb03a3 upgrade
2026-10-04 10:08:43 +02:00
.mvn/wrapper upgrade 2026-05-31 15:49:23 +02:00
client upgrade 2026-10-04 10:08:43 +02:00
src/main/java/com/example/demo upgrade 2026-06-20 05:31:59 +02:00
.gitignore Initial commit 2024-06-08 10:35:23 +02:00
mvnw Upgrade 2025-07-26 12:43:50 +02:00
mvnw.cmd Upgrade 2025-07-26 12:43:50 +02:00
pom.xml upgrade 2026-09-25 06:43:17 +02:00
README.md upgrade 2026-06-27 18:16:02 +02:00

Spring Boot SSE Demo

Small demo that streams server-sent events from Spring Boot to an Angular client.

Requirements

  • Java 21 or newer
  • Node.js with npm

Run the backend

./mvnw spring-boot:run

On Windows PowerShell:

.\mvnw.cmd spring-boot:run

The backend starts on http://localhost:8080 and exposes:

  • GET /register/{clientId} as an SSE stream

The scheduled demo publisher sends progress and event messages to client1 every five seconds. The backend also sends SSE heartbeat comments every 15 seconds so idle infrastructure is less likely to close the stream.

Run the Angular client

cd client
npm install
npm start

Open http://localhost:4200. The client subscribes to:

  • http://localhost:8080/register/client1

Verify

./mvnw test
cd client
npm run build

npm audit --omit=dev currently reports no production vulnerabilities. Remaining full-audit findings are in Angular build tooling.