package com.yh.saas.plugin.yiliangyiyun.config;

import com.aliyun.oss.OSSClient;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class OSSClientConfig {
    @Getter
    @Value("${oss.access.key.id:}")
    private String accessId;
    @Getter
    @Value("${oss.access.key.secret:}")
    private String accessKey;
    @Getter
    @Value("${oss.endpoint.default:}")
    private String endpoint;

    @Bean
    public OSSClient ossClient() {
        return new OSSClient(endpoint, accessId, accessKey);
    }

}
