java - 如何将响应属性和 JWT 令牌有效负载属性自定义为 lowerCamelCase
问题描述
oauth 2.0 的成功响应
"access_token": "xxxx",
"expires_in": 123456,
"scope": "read write"
降低驼峰式
"accessToken": "xxxx",
"expiresIn": 123456,
"scope": "read write"
和 jwt 有效载荷属性
{
"user_name": "xxxxx",
"scope": [
"read",
"write"
],
"exp": 1567481992,
"authorities": [
"XXX"
],
"jti": "xxxxxx",
"client_id": "xxxxxx"
}
降低驼峰式
{
"userName": "xxxxx",
"scope": [
"read",
"write"
],
"exp": 1567481992,
"authorities": [
"XXX"
],
"jti": "xxxxxx",
"clientId": "xxxxxx"
}
我尝试使用 jackson-property-naming-strategy: LOWER_CAMEL_CASE 但它对我不起作用。
解决方案
推荐阅读
- python - Pandas:如何构造二维以上的数据?
- c# - 如何将文本打印到统一程序中
- r - 我试图在数据框中改变一个新的数字列,但编译器将它作为字符,我什至无法使用索引访问它
- nestjs - 使用 TypeOrm Lazy Type 时哪个代码是正确的?
- javascript - 不小心删除了我的 .git 文件夹我怎么回来?
- r - 在每个条上添加自定义文本
- tensorflow - PyTorch vs Tensorflow 给出不同的结果
- groovy - Jira Plug-in ScriptRunner Escalation Service:post请求会继续返回缓存响应
- c# - Unity C# Vector3.Distance 产生意想不到的结果
- jquery - Bootstrap 5 模态窗口阻止 preventDefault() 事件在第二次发送时起作用