Skip to content

Commit

Permalink
fix: Add primary annotation to restTemplate for kakao api
Browse files Browse the repository at this point in the history
  • Loading branch information
jhssong committed Nov 13, 2024
1 parent 3d5a387 commit d8baf08
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/gdg/kkia/common/config/WebConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
Expand Down

0 comments on commit d8baf08

Please sign in to comment.