package com.seer.teach.common.minio.config;

import io.minio.MinioClient;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MinioClientConfig {
    @Bean
    public MinioClient minioClient(MinioConfig params) {
        return MinioClient.builder()
                .endpoint(params.getEndpoint())
                .credentials(params.getAccessKey(), params.getSecretKey())
                .build();
    }
}