Class 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 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 client
        errorHandlerProvider - the error handler provider
        Returns:
        the minio template