package com.kospo.talk.config.spring;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.concurrent.Executor;

@Configuration
@EnableAsync
public class WebClientConfig {
    @Value("${server.itsm}")
    private String itsmUrl;
    @Value("${server.scm}")
    private String scmUrl;

    @Bean
    public WebClient itsmWebClient() {
        return WebClient.builder()
                .baseUrl(itsmUrl)
                .build();
    }

    @Bean
    public WebClient scmWebClient() {
        return WebClient.builder()
                .baseUrl(scmUrl)
                .build();
    }
}
