参考:
https://blog.csdn.net/weixin_37869477/article/details/82762976
https://blog.csdn.net/sswqzx/article/details/84938223
ResponseEntity可以定义返回的HttpStatus(状态码)和HttpHeaders(消息头:请求头和响应头)
HttpStatus(状态码)https://blog.csdn.net/csdn1844295154/article/details/78980174
HttpHeaders(消息头:请求头和响应头)https://www.cnblogs.com/honghong87/articles/6941436.html
ResponseEntity :标识整个http相应:状态码、头部信息、响应体内容(spring)
@ResponseBody:加在请求处理方法上,能够处理方法结果值作为http响应体(springmvc)
@ResponseStatus:加在方法上、返回自定义http状态码(spring)
原文地址:https://www.cnblogs.com/flypig666/p/11729757.html
时间: 2024-10-05 11:32:16