Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
💡 작업 내용
💡 자세한 설명
Kakao Rest API 호출
*RestTemplate: HTTP 서버와 쉽게 통신 가능한 자바 라이브러로 응답을 JSON으로 쉽게 변환 가능
HTTP 요청 헤더에는 apiKey를 포함한 Authorization 헤더를 설정 한 후 HttpEntity에 포함합니다.
주어진 쿼리를 쿼리 매개변수로하여 API의 URL을 생성하고, 이를 이용하여 RestTemplate의 exchange 메서드를 호출하여 GET 요청을 보냅니다.
JSON으로 파싱 및 DTO 변환
반환된 ResponseEntity를 JSONObject를 통해 JSON으로 파싱하고 DB 삽입을 위한 DTO에 매핑합니다.
추후 고민 및 처리 사항
📗 참고 자료
https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/web/client/RestTemplate.html
🚩 후속 작업
✅ 셀프 체크리스트
closes #47