Refactor: AI 요청 서버 시간제한 해제

This commit is contained in:
김용수 2024-10-04 13:39:04 +09:00
parent 62f6616806
commit 5128c892d0
2 changed files with 21 additions and 7 deletions

View File

@ -0,0 +1,20 @@
package com.worlabel.global.config;
import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import java.time.Duration;
@Configuration
public class RestTemplateConfig {
@Bean
public RestTemplate restTemplate(RestTemplateBuilder builder) {
return builder
.setConnectTimeout(Duration.ZERO)
.setReadTimeout(Duration.ZERO)
.build();
}
}

View File

@ -2,9 +2,8 @@ package com.worlabel.global.config;
import com.worlabel.global.resolver.CurrentUserArgumentResolver;
import lombok.RequiredArgsConstructor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
@ -20,9 +19,4 @@ public class WebConfig implements WebMvcConfigurer {
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> resolvers) {
resolvers.add(currentUserArgumentResolver);
}
@Bean
public RestTemplate restTemplate() {
return new RestTemplate();
}
}