作者 crossoverJie
提交者 GitHub

Merge pull request #11 from xiaozi0lei/master

【文档】更新 README
... ... @@ -116,3 +116,9 @@ fabric.properties
.idea/httpRequests
.idea/
*.iml
*.project
*.settings/
*.classpath
*.factorypath
.vscode/
\ No newline at end of file
... ...
... ... @@ -135,7 +135,38 @@ java -jar cim-client-1.0.0-SNAPSHOT.jar --server.port=8084 --cim.user.id=唯一
如上图,启动两个客户端可以互相通信即可。
### 本地启动客户端
#### 注册账号
```shell
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{
"reqNo": "1234567890",
"timeStamp": 0,
"userName": "zhangsan"
}' 'http://路由服务器:8083/registerAccount'
```
从返回结果中获取 `userId`
```shell
{
"code": "9000",
"message": "成功",
"reqNo": null,
"dataBody": {
"userId": 1547028929406,
"userName": "zhangsan"
}
}
```
#### 启动本地客户端
```shell
# 启动本地客户端
cp /cim/cim-client/target/cim-client-1.0.0-SNAPSHOT.jar /xx/work/route0/
cd /xx/work/route0/
java -jar cim-client-1.0.0-SNAPSHOT.jar --server.port=8084 --cim.user.id=上方返回的userId --cim.user.userName=用户名 --cim.group.route.request.url=http://路由服务器:8083/groupRoute --cim.server.route.request.url=http://路由服务器:8083/login
```
## 客户端内置命令
... ...
... ... @@ -34,7 +34,7 @@ cim.server.online.user.url=http://45.78.28.220:8083/onlineUser
#cim.server.route.request.url=http://localhost:8083/login
#
## 在线用户
#cim.server.online.user=http://localhost:8083/onlineUser
#cim.server.online.user.url=http://localhost:8083/onlineUser
# 客户端唯一ID
cim.user.id=1545574841528
... ...