Package org.bremersee.data.minio
Class MinioAutoConfiguration
- java.lang.Object
-
- org.bremersee.data.minio.MinioAutoConfiguration
-
@Configuration @ConditionalOnClass({io.minio.MinioClient.class,MinioTemplate.class}) @ConditionalOnProperty(prefix="bremersee.minio", name={"url","access-key","secret-key"}) @EnableConfigurationProperties(MinioProperties.class) public class MinioAutoConfiguration extends Object
The minio auto configuration.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description MinioAutoConfiguration(MinioProperties properties)
Instantiates a new minio auto configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
init()
Init.io.minio.MinioClient
minioClient()
Creates minio client.MinioTemplate
minioTemplate(io.minio.MinioClient minioClient, org.springframework.beans.factory.ObjectProvider<MinioErrorHandler> errorHandlerProvider)
Creates minio template.
-
-
-
Constructor Detail
-
MinioAutoConfiguration
public MinioAutoConfiguration(MinioProperties properties)
Instantiates a new minio auto configuration.- Parameters:
properties
- the properties
-
-
Method Detail
-
init
@EventListener(org.springframework.boot.context.event.ApplicationReadyEvent.class) public void init()
Init.
-
minioClient
@ConditionalOnMissingBean @Bean public io.minio.MinioClient minioClient()
Creates minio client.- Returns:
- the minio client
-
minioTemplate
@ConditionalOnMissingBean(MinioOperations.class) @Bean public MinioTemplate minioTemplate(io.minio.MinioClient minioClient, org.springframework.beans.factory.ObjectProvider<MinioErrorHandler> errorHandlerProvider)
Creates minio template.- Parameters:
minioClient
- the minio clienterrorHandlerProvider
- the error handler provider- Returns:
- the minio template
-
-