RestClientConfig.java 928 Bytes
package vion.config;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestClient;

/**
 * @author HlQ
 * @date 2024/7/19
 */
@Configuration
@Slf4j
public class RestClientConfig {

    @Bean(name = "bongRestClient")
    public RestClient getBongRestClient() {
        return RestClient.builder()
                .baseUrl("https://proapi.xbongbong.com")
                .build();
    }

    @Bean(name = "oDingRestClient")
    public RestClient getODingRestClient() {
        return RestClient.builder()
                .baseUrl("https://oapi.dingtalk.com")
                .build();
    }

    @Bean(name = "dingRestClient")
    public RestClient getdingRestClient() {
        return RestClient.builder()
                .baseUrl("https://api.dingtalk.com")
                .build();
    }
}