SpringBootExample
Some useful project example which are created with SpringBoot 2.1.x and some relevant technologies.
spring-websocket
a simple chat application project with SpringBoot 2.1.x which contains Thymeleaf, Websocket, SpringData-Redis, and ReconnectingWebSocket js lib.
Feature
- Any message will be send to all websocket client(browser).
- The chat server subscribes to Redis at channel ws_msg_channel. It also can publish the message to other subscribers by redis.
Usage
- Launch it by running SpringWebsocketApplication using IntelliJ IDEA
- It is aussmued that the Redis is installed at 127.0.0.1:6379
- Open http://127.0.0.1:8080/websocket in your browser.
- The page will establish a websocket connection to backend ws://127.0.0.1/ws
- Now, you can send message to chat server.