springboot实现token登录,但是没使用到redis缓存存储token:
代码来源:token实现登录
http://localhost:9090/user/login
发送:
{
"mobile":"123456",
"password":"123"
}
结果:
{
"code": 200,
"msg": null,
"data": {
"mobile": "123456",
"password": null,
"name": null,
"nickName": null,
"token": "eyJhbGciOiJIUzUxMiIsInppcCI6IkdaSVAifQ.H4sIAAAAAAAAAKtWKi5NUrJSCg5y0g0Ndg1S0lFKrShQsjI0Mze2MDU0tDDUUSotTi3yTAGJGZoYmRkYmJsaGxsaWFgYW5jpKOXmJ2XmpAJNMDQyNjE1U6oFAOJ1wypSAAAA.p_jLmi9zgX-g9-O4t8ZmuIxj6OoDW__nR7uvDvB7-h33iPX4fIwnESCXaWhRqby3Zjy378qlVzb-I5Q1dZinHw"
},
"map": {}
}
再通过测试其他接口:
没问题的!