package com.heyu.api.config;

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

@Configuration
public class OssConfig {

	@Bean
	public OSSClient ossClient(@Value("${oss.config.endpoint}") String endpoint,
							   @Value("${oss.config.accessKeyId}") String accessKeyId,
							   @Value("${oss.config.secretAccessKey}") String secretAccessKey){
		OSSClient ossClient = new OSSClient(endpoint,accessKeyId, secretAccessKey);
		return ossClient;
	}

}
