package com.clx.performance.config;

import com.msl.common.open.ConfiguredOpenClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.Objects;

@Configuration
public class ConfiguredOpenClientConfig {
    @Bean
    public ConfiguredOpenClient configuredOpenClient(ConfiguredOpenProperties properties) {
        return new ConfiguredOpenClient(Objects.requireNonNull(properties.getGatewayUrl()),
                Objects.requireNonNull(properties.getAppId()),
                Objects.requireNonNull(properties.getAppKey()));
    }
}
