package com.changfa.multi.config;

import com.changfa.utils.MinioProperties;
import io.minio.MinioClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinoConfig {


    @Bean
    public MyMinioClient minioConfig(MinioProperties minioProperties){
       return new MyMinioClient(MinioClient.builder().endpoint(minioProperties.getEndpoint()).credentials(minioProperties.getAccessKey(), minioProperties.getSecretKey()).build());
    }
}
