package org.brapi.test.BrAPITestServer.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import io.minio.MinioClient;

@Configuration
public class MinioConfig {

	@Bean
	public MinioClient minioClient(MinioProperties properties) {
		return MinioClient.builder()
				.endpoint(properties.getEndpointUrl())
				.credentials(properties.getAccessKey(), properties.getSecretKey())
				.build();
	}
}
