[Spring] HTTP 요청과 응답 방법
-- 목차 --HTTP 요청 파라미터쿼리 파라미터조회방법필수여부기본값 설정HTTP 요청 메시지JSONHTTP 응답JSON HTTP 요청 파라미터 쿼리 파라미터 예시 URL ->http://localhost:8080/request-param?id=west&age=20 GET 쿼리 파라미터와 POST HTML Form 전송 방식에서 사용이 가능하다. 조회방법@RequestParam 애노테이션으로 사용가능 @ResponseBody @RequestMapping("/request-param") public String requestParam( @RequestParam String id, @RequestParam Integer age ){ ..
BE/Spring 2024.07.01