Skip to content

Conversation

@swandevson
Copy link

No description provided.

@swandevson swandevson self-assigned this Aug 25, 2024
Copy link
Member

@yohanii yohanii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

잘 해결하신 것 같습니다!
고생하셨습니다~

Comment on lines +20 to +21
.body(new ParameterizedTypeReference<>() {
});
Copy link
Member

@yohanii yohanii Aug 28, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저도 complete에 있는 거 보고 알았는데,
.body(Todo[].class)로 하고, List로 변환 하는 법도 있더라구요!

ResponseEntity<Todo> todoResponseEntity = restTemplate.getForEntity(TODO_URL + "/" + id, Todo.class);

return todoResponseEntity.getBody();
} catch (RestClientException e) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RestClientException 범위가 넓어서, 어떤 Exception들이 포함되는지 알아보는 것도 좋을 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants