shape = JsonFormat.Shape.STRING
时间: 2023-10-18 19:26:36 浏览: 132
shape = JsonFormat.Shape.STRING是@JsonFormat注解的一个参数,用来表示json序列化后字段的类型。当字段被标记为shape = JsonFormat.Shape.STRING时,该字段会被序列化为字符串格式,而不是其他类型。这可以解决一些在前端处理时,对数字或其他类型字段可能出现的截断问题。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [记一次返回前端数据id跟数据库不一致问题@JsonFormat(shape = JsonFormat.Shape.STRING)](https://blog.csdn.net/weixin_48950399/article/details/130102667)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
- *2* [@JsonFormat 使用方法](https://blog.csdn.net/asd26655/article/details/125252564)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文