Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwenjian/springboot-sse-demo
Demo project that use SSE in SpringBoot to send message to UI.
https://github.com/jwenjian/springboot-sse-demo
danmaku server-send-event springboot sse sse-client water-css
Last synced: 26 days ago
JSON representation
Demo project that use SSE in SpringBoot to send message to UI.
- Host: GitHub
- URL: https://github.com/jwenjian/springboot-sse-demo
- Owner: jwenjian
- License: apache-2.0
- Created: 2019-08-13T09:54:18.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-14T03:36:11.000Z (over 5 years ago)
- Last Synced: 2024-10-03T08:47:01.733Z (about 1 month ago)
- Topics: danmaku, server-send-event, springboot, sse, sse-client, water-css
- Language: Java
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# springboot-sse-demo
Demo project that use SSE in SpringBoot to send message to UI.# About SSE
[SSE](https://en.wikipedia.org/wiki/Server-sent_events) 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
- [danmaku](https://github.com/weizhenye/Danmaku)
- [water.css](https://github.com/kognise/water.css)# Run
> Requirement:
1. JDK8+
2. Maven3+1. Clone the repository
2. `mvn clean install -DskipTests`
3. `java -jar target/sse-demo-0.0.1-SNAPSHOT.jar`
4. Browse `http://localhost:4000` in your browser
> Note: IE is not supported, see [Browser_compatibility](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Browser_compatibility)You can also see the dev tools for detail.
# Screenshot
- UI
![image](https://user-images.githubusercontent.com/25657798/62934355-eac69c80-bdf6-11e9-9050-c46ea697db84.png)- Network in Dev tool
![image](https://user-images.githubusercontent.com/25657798/62934783-f9fa1a00-bdf7-11e9-8d28-0631acc52072.png)