Springboot ResponseBody注解会返回json数据吧
时间: 2023-12-21 07:42:46 浏览: 109
是的,SpringMVC的@ResponseBody注解可以将后端返回的数据转换为Json格式,并将其作为响应返回给前端。这样可以方便地进行后端与前端的数据交互。\[1\]\[2\]所以,当使用@ResponseBody注解时,后端返回的数据会以Json格式返回给前端。这样可以避免每次都手动组拼返回数据的固定格式,提高了开发效率。\[1\]\[2\]\[3\]
#### 引用[.reference_title]
- *1* [SpringBoot定制@ResponseBody注解返回的Json格式](https://blog.csdn.net/qq_33328356/article/details/89856823)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
- *2* *3* [详解SpringBoot定制@ResponseBody注解返回的Json格式](https://blog.csdn.net/weixin_36161279/article/details/114200500)[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^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文