You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
HTTP API나 REST API를 제공할 때, HTML 대신 JSON, XML, TEXT와 같은 형식의 데이터를 HTTP 메시지 body에 담아 보낸다. Spring에서는 이러한 응답을 ResponseEntity와 @ResponseBody로 편리하게 작성할 수 있음을 배웠다.
그렇다면 ResponseEntity와 @ResponseBody의 차이점은 무엇인지 정리해보자.