JSON으로 HTTP 요청 메시지에 대한 컨트롤러에서의 처리 방법 import com.fasterxml.jackson.databind.ObjectMapper; import org.springframework.stereotype.Controller; import org.springframework.util.StreamUtils; import java.nio.charset.StandardCharsets; /** * {"username":"hello", "age":20} * content-type: application/json */ @Slf4j @Controller public class RequestBodyJsonController { private ObjectMapper objectMapper = new..
HttpEntity HTTP header, body 정보를 편리하게 조회 메시지 바디 정보를 직접 조회 요청 파라미터를 조회하는 기능과 관계 없음(@RequestParam X , @ModelAttirbute X) package hello.springmvc.basic.request; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpEntity; import org.springframework.http.HttpStatus; import org.springframework.http.RequestEntity; import org.springframework.http.ResponseEntity; import org.springframew..