티스토리 뷰
private HttpHeaders createHeaders() {
HttpHeaders headers = new HttpHeaders();
headers.add("X-Naver-Client-Id", clientId);
headers.add("X-Naver-Client-Secret", clientSecret);
return headers;
}
@Bean
public WebClient kakaoWebClient() {
return WebClient.builder()
.baseUrl(baseurl)
.defaultHeaders((headers -> {headers.addAll(createHeaders());}))
.build();
}
}
댓글
- Total
최근에 올라온 글