/springboot-sse-demo

Demo project that use SSE in SpringBoot to send message to UI.

Primary LanguageJavaApache License 2.0Apache-2.0

springboot-sse-demo

Demo project that use SSE in SpringBoot to send message to UI.

About SSE

SSE is a server push technology enabling a browser to receive automatic updates from a server via HTTP connection. The Server-Sent Events EventSource API is standardized as part of HTML5[1] by the W3C.

Dependency

Java

  • SpringBoot Starter Web
  • Thymleaf

UI

Run

Requirement:

  1. JDK8+

  2. Maven3+

  3. Clone the repository

  4. mvn clean install -DskipTests

  5. java -jar target/sse-demo-0.0.1-SNAPSHOT.jar

  6. Browse http://localhost:4000 in your browser

Note: IE is not supported, see Browser_compatibility

You can also see the dev tools for detail.

Screenshot

  • UI image

  • Network in Dev tool image