1 Star 0 Fork 0

huahua1013 / compute

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

API接口文档

简介

springboot集成websocket,实现即时通讯

HOST:localhost:39112

联系人:huahua1013

Version:1.0

接口路径:/v2/api-docs

用户基础服务

登录

接口描述:

接口地址:/user/login

请求方式POST

consumes:["application/json"]

produces:["*/*"]

请求示例

{
	"accountNonExpired": true,
	"accountNonLocked": true,
	"authorities": [
		{
			"authority": ""
		}
	],
	"createTime": "",
	"credentialsNonExpired": true,
	"enabled": true,
	"id": "",
	"modifyTime": "",
	"nickName": "",
	"password": "",
	"phoneNumber": "",
	"state": "",
	"token": "",
	"userName": "",
	"userPassword": "",
	"username": ""
}

请求参数

参数名称 参数说明 in 是否必须 数据类型 schema
user user body true 用户实体类 用户实体类

schema属性说明

用户实体类

参数名称 参数说明 in 是否必须 数据类型 schema
accountNonExpired body false boolean
accountNonLocked body false boolean
authorities body false array GrantedAuthority
createTime 创建时间 body false string(date-time)
credentialsNonExpired body false boolean
enabled body false boolean
id id body false string
modifyTime 修改时间 body false string(date-time)
nickName 昵称 body false string
password body false string
phoneNumber 电话号码,用来登陆和判断唯一标识 body false string
state 状态 1:有效 2:无效 body false string
token jwt生成token body false string
userName body false string
userPassword 密码 body false string
username body false string

GrantedAuthority

参数名称 参数说明 in 是否必须 数据类型 schema
authority body false string

响应示例:

{
	"code": 0,
	"data": {
		"accountNonExpired": true,
		"accountNonLocked": true,
		"authorities": [
			{
				"authority": ""
			}
		],
		"createTime": "",
		"credentialsNonExpired": true,
		"enabled": true,
		"id": "",
		"modifyTime": "",
		"nickName": "",
		"password": "",
		"phoneNumber": "",
		"state": "",
		"token": "",
		"userName": "",
		"userPassword": "",
		"username": ""
	},
	"msg": ""
}

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data 用户实体类 用户实体类
msg string

schema属性说明

用户实体类

参数名称 参数说明 类型 schema
accountNonExpired boolean
accountNonLocked boolean
authorities array GrantedAuthority
createTime 创建时间 string(date-time)
credentialsNonExpired boolean
enabled boolean
id id string
modifyTime 修改时间 string(date-time)
nickName 昵称 string
password string
phoneNumber 电话号码,用来登陆和判断唯一标识 string
state 状态 1:有效 2:无效 string
token jwt生成token string
userName string
userPassword 密码 string
username string

GrantedAuthority

参数名称 参数说明 类型 schema
authority string

响应状态:

状态码 说明 schema
200 OK ResponseResult«用户实体类»
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

注册

接口描述:

接口地址:/user/register

请求方式POST

consumes:["application/json"]

produces:["*/*"]

请求示例

{
	"accountNonExpired": true,
	"accountNonLocked": true,
	"authorities": [
		{
			"authority": ""
		}
	],
	"createTime": "",
	"credentialsNonExpired": true,
	"enabled": true,
	"id": "",
	"modifyTime": "",
	"nickName": "",
	"password": "",
	"phoneNumber": "",
	"state": "",
	"token": "",
	"userName": "",
	"userPassword": "",
	"username": ""
}

请求参数

参数名称 参数说明 in 是否必须 数据类型 schema
user user body true 用户实体类 用户实体类

schema属性说明

用户实体类

参数名称 参数说明 in 是否必须 数据类型 schema
accountNonExpired body false boolean
accountNonLocked body false boolean
authorities body false array GrantedAuthority
createTime 创建时间 body false string(date-time)
credentialsNonExpired body false boolean
enabled body false boolean
id id body false string
modifyTime 修改时间 body false string(date-time)
nickName 昵称 body false string
password body false string
phoneNumber 电话号码,用来登陆和判断唯一标识 body false string
state 状态 1:有效 2:无效 body false string
token jwt生成token body false string
userName body false string
userPassword 密码 body false string
username body false string

GrantedAuthority

参数名称 参数说明 in 是否必须 数据类型 schema
authority body false string

响应示例:

{
	"code": 0,
	"data": {},
	"msg": ""
}

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data object
msg string

响应状态:

状态码 说明 schema
200 OK ResponseResult
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

用户聊天服务

发送消息给其他人

接口描述:

接口地址:/sendMsgToOther

请求方式POST

consumes:["application/json"]

produces:["*/*"]

请求示例

{
	"createTime": "",
	"id": "",
	"isRead": "",
	"modifyTime": "",
	"msgContent": "",
	"receiveId": "",
	"receiveType": "",
	"sendUserId": "",
	"state": "",
	"type": ""
}

请求参数

参数名称 参数说明 in 是否必须 数据类型 schema
request request body true 消息表 消息表

schema属性说明

消息表

参数名称 参数说明 in 是否必须 数据类型 schema
createTime 创建时间 body false string(date-time)
id 消息编码 body false string
isRead 消息已读状态: 1:已读 2:未读 body false string
modifyTime 修改时间 body false string(date-time)
msgContent 消息内容 body true string
receiveId 接收者编码,接收者可能是群或者个人 body true string
receiveType 接收人类型 1:个人 2:群 body true string
sendUserId 发送人编码 body true string
state 消息状态 1:有效 2:无效 body false string
type 消息类型 1:文本 2:文件(图片属于文件) body true string

响应示例:

{
	"code": 0,
	"data": {},
	"msg": ""
}

响应参数:

参数名称 参数说明 类型 schema
code integer(int32) integer(int32)
data object
msg string

响应状态:

状态码 说明 schema
200 OK ResponseResult
201 Created
401 Unauthorized
403 Forbidden
404 Not Found

空文件

简介

使用SpringBoot+SpringSecurity技术架构起登录注册模块,该仓库建立的目的是做成一个在线聊天室的后台 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Java
1
https://gitee.com/hua-hua1013/compute.git
git@gitee.com:hua-hua1013/compute.git
hua-hua1013
compute
compute
master

搜索帮助