package com.zswl.cloud.springBtach.server.core.api.xiaoju;

import com.xiaoju.open.oil.commons.config.OilConfig;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class XiaoJunConfig {

    @Value("${xiaoju.appId}")
    private String appid;

    @Value("${xiaoju.appSecret}")
    private String appSecret;

    @Value("${xiaoju.dataSecret}")
    private String dataSecret;

    @Value("${xiaoju.dataSecretIV}")
    private String dataSecretIV;

    @Value("${xiaoju.sigSecret}")
    private String sigSecret;

    @Value("${xiaoju.serverUrl}")
    private String serverUrl;

    @Bean
    public OilConfig config() {

        OilConfig oilConfig = new OilConfig();
        oilConfig.setAppId(appid);
        oilConfig.setAppSecret(appSecret);
        oilConfig.setDataSecret(dataSecret);
        oilConfig.setDataSecretIV(dataSecretIV);
        oilConfig.setSigSecret(sigSecret);
        oilConfig.setServerUrl(serverUrl);
        return oilConfig;


    }



}
