1 Star 0 Fork 17

fnet / spring-boot-restful

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

Spring Boot Example

This is a basic example of how to use Kotlin in a Spring Boot application. See the accompanying tutorial for more information.

To run:

$ gradle bootRun

Api request flow

对验证接口发起一个post请求,header 带上Username和Password

POST http://localhost:8080/api/v1/authenticate

add header
X-Auth-Username:user
X-Auth-Password:password

得到token,这里的message

{
"status": 200,
"message": "MTUwMDYzMjE2OTM0NGY0ZjQwMDk5NzMwYzQwNTdhNGZhM2U3ZTY5ZDIxNWJk"
}

最后请求其他接口的时候,在header带上这个token

GET  http://localhost:8080/api/v1/users/1?page=1
add header
X-Authorization:MTUwMDYzMjE2OTM0NGY0ZjQwMDk5NzMwYzQwNTdhNGZhM2U3ZTY5ZDIxNWJk

Features

  • restful 风格api举例
  • Token 身份验证,使用过滤器
  • 方法级别权限控制api接口
  • 处理异常自定返回结果
  • servlet异步响应
  • model数据处理

空文件

简介

使用kotlin语言,使用spring-boot,搭建restful风格应用 展开 收起
Kotlin
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Kotlin
1
https://gitee.com/fnet/spring-boot-restful.git
git@gitee.com:fnet/spring-boot-restful.git
fnet
spring-boot-restful
spring-boot-restful
master

搜索帮助