From d8baf08dc8dd25f0940af6770133379ab34cbb93 Mon Sep 17 00:00:00 2001 From: jhssong Date: Wed, 13 Nov 2024 20:42:51 +0900 Subject: [PATCH] fix: Add primary annotation to restTemplate for kakao api --- src/main/java/com/gdg/kkia/common/config/WebConfig.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/com/gdg/kkia/common/config/WebConfig.java b/src/main/java/com/gdg/kkia/common/config/WebConfig.java index d42f85b..5272989 100644 --- a/src/main/java/com/gdg/kkia/common/config/WebConfig.java +++ b/src/main/java/com/gdg/kkia/common/config/WebConfig.java @@ -12,6 +12,7 @@ import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Primary; import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; import org.springframework.web.client.RestTemplate; import org.springframework.web.cors.CorsConfiguration; @@ -33,6 +34,7 @@ public class WebConfig implements WebMvcConfigurer { private final JwtInterceptor jwtInterceptor; @Bean + @Primary public RestTemplate restTemplate(RestTemplateBuilder builder, RestTemplateResponseErrorHandler errorHandler) { return builder .errorHandler(errorHandler)