spring RestController
时间: 2023-10-19 08:01:40 浏览: 85
Spring的@RestController注解是在Spring 4.0版本之后新增的注解。它的作用相当于将@Controller和@ResponseBody注解合并在一起。@RestController注解用于标识一个类是一个控制器,并且控制器的方法返回的是RESTful风格的响应数据。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *3* [SpringMVC使用@RestController来构建Restful风格接口](https://blog.csdn.net/baixiaozheng/article/details/126126647)[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_2"}}] [.reference_item style="max-width: 50%"]
- *2* [SpringBoot @RestController详解](https://blog.csdn.net/li_w_ch/article/details/108937337)[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_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文