我想知道是否可以自定义以下授权错误:
{
"error": "unauthorized",
"error_description": "Full authentication is required to access this resource"
}
Run Code Online (Sandbox Code Playgroud)
当用户请求没有权限时,我得到了它。我想将其自定义为与Spring Boot错误非常相似:
{
"timestamp":1445441285803,
"status":401,
"error":"Unauthorized",
"message":"Bad credentials",
"path":"/oauth/token"
}
Run Code Online (Sandbox Code Playgroud)
有可能吗
非常感谢。
java security spring-security spring-boot spring-security-oauth2