POST: http://localhost:8800/authentication/register 参数:
{
"username":"lognxn",
"password":"123"
}
head设置: Content-Type: application/json
POST: http://localhost:8800/authentication/login 参数: username: lognxn password: 123
head设置: Content-Type: application/x-www-form-urlencoded
GET: http://localhost:8800/normal/test 返回:
{
"timestamp": "2019-06-25T15:25:24.686+0000",
"status": 403,
"error": "Forbidden",
"message": "Access Denied",
"path": "/normal/test"
}
不带 Token直接访问需要普通角色( ROLE_NORMAL)的接口 /normal/test会直接提示访问不通: