spring of understanding ResponseEntity

reference:

https://blog.csdn.net/weixin_37869477/article/details/82762976

https://blog.csdn.net/sswqzx/article/details/84938223

ResponseEntity HttpStatus can define a return (status codes) and HttpHeaders (message header: request headers and response headers)

HttpStatus (status code) https://blog.csdn.net/csdn1844295154/article/details/78980174

HttpHeaders (header: request headers and response headers) https://www.cnblogs.com/honghong87/articles/6941436.html

 

ResponseEntity: http respective whole identification: status code, header information, in response to the content thereof (Spring)
@ResponseBody: added to the request processing method, a processing method http response value as a result of body (SpringMVC)
@ResponseStatus: the method is applied, http custom return status codes (Spring)

Guess you like

Origin www.cnblogs.com/flypig666/p/11729757.html