# farmer-im **Repository Path**: tech-famer/farmer-im ## Basic Information - **Project Name**: farmer-im - **Description**: 一款基于Spring+websocket开发的及时通讯系统,支持集群部署(理论上可以有连接数量限制)、心跳检测、在线状态同步等功能 - **Primary Language**: Java - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2022-02-25 - **Last Updated**: 2023-03-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # farmer-im #### 介绍 一款基于Spring+websocket开发的及时通讯系统,支持集群部署(理论上可以没有连接数量限制)、心跳检测、在线状态同步等功能,目前支持文本消息、图片消息、文件消息、位置消息、语音消息。 #### 使用教程(以本机两个实例举例) 1. 启动实例1,设置端口号为8081 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/170727_40d18cf9_9890512.png "屏幕截图.png") 2. 启动实例2,设置端口号为8083 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/170832_d41624e1_9890512.png "屏幕截图.png") 3. 启动nginx代理,监听端口8082 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/171051_68a2e977_9890512.png "屏幕截图.png") 4. 浏览器窗口1访问地址:http://localhost:8082/test/index?userName=test1# ,窗口2访问地址:http://localhost:8082/test/index?userName=test2# ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/171715_102e150e_9890512.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/171738_6a038498_9890512.png "屏幕截图.png") 可以看到多用户上线时,链接会分散建立在不同的实例 5. 修改要聊天的在线用户,该元素为input标签可以直接选中修改。 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/171942_ff722d52_9890512.png "屏幕截图.png") 6. 发送消息,查看效果 ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/172129_4aa7c902_9890512.png "屏幕截图.png") ![输入图片说明](https://images.gitee.com/uploads/images/2022/0225/172137_c4173f13_9890512.png "屏幕截图.png") 7. 图片消息 ![输入图片说明](other/image.png) ![输入图片说明](other/image1.png) 8. 文件消息 ![输入图片说明](other/image2.png) ![输入图片说明](other/image3.png) 9. 位置信息 ![输入图片说明](other/image4.png) ![输入图片说明](other/image5.png) 10. 语音消息 ![输入图片说明](other/image6.png) ![输入图片说明](other/image7.png)