| | |
| | | package com.ard.utils.minio; |
| | | |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | |
| | | |
| | | @Configuration |
| | | @Slf4j(topic = "minio") |
| | | @ConfigurationProperties("minio") |
| | | @Data |
| | | public class MinioConfig { |
| | | |
| | | @Value("${spring.minio.endpoint}") |
| | | private String endpoint; |
| | | @Value("${spring.minio.accessKey}") |
| | | private String accessKey; |
| | | @Value("${spring.minio.secretKey}") |
| | | private String secretKey; |
| | | |
| | | @Bean |
| | |
| | | log.info("初始化minio配置"+"【"+endpoint+"("+accessKey+"/"+secretKey+")】"); |
| | | return new MinioUtil(endpoint,accessKey,secretKey); |
| | | } |
| | | } |
| | | } |