GIT项目

SpringBoot-MyBatis Spring boot + MyBatis 提供 SaaS 接口服务

Springboot+MyBatis提供SaaS接口服务SpringBoot-MyBatisSpringboot+MyBatis提供RESTful风格SaaS服务get请求不需要鉴权token,所有的post、put、delete请求均作了接口token鉴权,不过具体的鉴权逻辑没有实现,硬编码token=123456为鉴权通过,其余均为非法请求。------接口列表------一、类别相关接口1.

Spring boot + MyBatis 提供 SaaS 接口服务

SpringBoot-MyBatis

Spring boot + MyBatis 提供 RESTful 风格 SaaS 服务

get请求不需要鉴权token,所有的post、put、delete请求均作了接口token鉴权,不过具体的鉴权逻辑没有实现,硬编码 token=123456 为鉴权通过,其余均为非法请求。

------ 接口列表 ------

一、类别相关接口

1.1、添加类别接口

http + post /category
Request body :
{
    "token": "123456",
    "name": "name",
    "introduction": "introduction",
    "preview": "preview"
}
Response data :
{
  "code": 0,
  "msg": "OK",
  "result": null
}

1.2、删除类别接口

http + delete /category/{id}
Request body : 
{
    "token":"123456"
}
Response data :
{
  "code": 0,
  "msg": "OK",
  "result": null
}

1.3、更新类别接口

http + put /category/{id}
Request body : 
{
    "token":"123456",
    "name": "name",
    "introduction": "introduction",
    "preview":"preview"
}
Response data :
{
  "code": 0,
  "msg": "OK",
  "result": null
}

1.4、获取类别详情接口

http + get /category/{id}
Response data :
{
  "code": 0,
  "msg": "OK",
  "result": {
    "id": "27837bca658b40f990b2e75768357847",
    "createTime": 1490853441000,
    "updateTime": 1490853441000,
    "name": "name",
    "introduction": "introduction1",
    "preview": "preview"
  }
}

1.5、分页获取类别列表接口

http + get /category?pageno=1&pagesize=10
Response data :
{
  "code": 0,
  "msg": "OK",
  "result": {
    "total": 5,
    "nodes": [
      {
        "id": "27837bca658b40f990b2e75768357847",
        "createTime": 1490853441000,
        "updateTime": 1490853441000,
        "name": "哈哈",
        "introduct

原创不易,完成人机校验,阅读全文

相关推荐