[ADD] kubeflowUrl을 @Value로 주입받도록 수정 및 baseUrl 설정값 변경

main
bjkim 1 month ago
parent 8170e8cd1a
commit 0d2751841b

@ -16,6 +16,7 @@ import org.springframework.batch.core.step.builder.StepBuilder;
import org.springframework.batch.item.ItemProcessor; import org.springframework.batch.item.ItemProcessor;
import org.springframework.batch.item.ItemReader; import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.ItemWriter; import org.springframework.batch.item.ItemWriter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cache.Cache; import org.springframework.cache.Cache;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@ -41,6 +42,9 @@ public class KubeflowRunBatchConfig {
private final KubeflowRunRepository kubeflowRunRepository; private final KubeflowRunRepository kubeflowRunRepository;
private final CacheManager cacheManager; private final CacheManager cacheManager;
@Value("${kubeflow.url:http://localhost:8080}")
private String kubeflowUrl;
private static final int PAGE_SIZE = 50; private static final int PAGE_SIZE = 50;
private static final String SORT_BY = "created_at DESC"; private static final String SORT_BY = "created_at DESC";
@ -50,7 +54,7 @@ public class KubeflowRunBatchConfig {
.responseTimeout(Duration.ofSeconds(30)); // 응답 제한 .responseTimeout(Duration.ofSeconds(30)); // 응답 제한
return WebClient.builder() return WebClient.builder()
.baseUrl("http://192.168.10.135:32473") .baseUrl(kubeflowUrl)
.clientConnector(new ReactorClientHttpConnector(httpClient)) .clientConnector(new ReactorClientHttpConnector(httpClient))
.exchangeStrategies(ExchangeStrategies.builder() .exchangeStrategies(ExchangeStrategies.builder()
.codecs(configurer -> configurer.defaultCodecs() .codecs(configurer -> configurer.defaultCodecs()

Loading…
Cancel
Save