
[Spring Boot] RestTemplate 사용법 서버 간 통신 getForEntity, postForEntity
·
프로그래밍 일기/Java & Spring
버전정보 Java 11 Spring Boot 2.7.13 RestTemplate 메서드 메서드 HTTP 상세설명 getForObject GET URL 주소로 HTTP GET 메서드로 객체로 결과를 반환받는다. getForEntity GET URL 주소로 HTTP GET 메서드로 결과는 ResponseEntity로 반환받는다. postForLocation POST POST 요청을 보내고 결과로 헤더에 저장된 URI를 결과로 반환받는다. postForObject POST POST 요청을 보내고 객체로 결과를 반환받는다. postForEntity POST POST 요청을 보내고 결과로 ResponseEntity로 반환받는다. delete DELETE URL 주소로 HTTP DELETE 메서드를 실행한다. he..