# springboot-chatgroup **Repository Path**: jamno/chatgroup ## Basic Information - **Project Name**: springboot-chatgroup - **Description**: springboot、websocket - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2021-07-08 - **Last Updated**: 2021-12-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # web在线聊天室 > 使用springboot thymeleaf和websocket搭建 ## 如何构建 1. 导入依赖 ```xml org.springframework.boot spring-boot-starter-thymeleaf org.springframework.boot spring-boot-starter-websocket org.springframework.boot spring-boot-starter-web ``` ## API 接口 ### 进入聊天室主页 - API: http://localhost:8080/api/ws/index/{sid} - 请求参数:GET ```text 路径参数 sid: 用户账号 ``` ### 服务器推送消息给指定账号 - API: http://localhost:8080/api/ws/push/{sid} - 请求参数:GET ```text 路径参数 sid: 用户账号 请求参数 msg:用户要发送的消息 ```