Skip to content

Commit

Permalink
perf($Starter): dynamic MinIO client
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
johnnymillergh committed Jun 8, 2021
1 parent 4db17c0 commit 7d030a3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ maf:
swagger-disabled: false

minio:
enabled: true
endpoint: http://localhost
port: 9900
access-key: maf_minio_root_user
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.jmsoftware.maf.springcloudstarter.helper.MinioHelper;
import io.minio.MinioClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
Expand All @@ -19,6 +20,7 @@
@Import({
MinioProperty.class
})
@ConditionalOnProperty({"minio.enabled"})
public class MinioConfiguration {
@Bean
public MinioClient minioClient(MinioProperty minioProperty) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ public class MinioProperty {
* The constant PREFIX.
*/
public static final String PREFIX = "minio";
/**
* The Enabled.
*/
@NotNull
private Boolean enabled = Boolean.FALSE;
/**
* The Endpoint.
*/
Expand Down

0 comments on commit 7d030a3

Please sign in to comment.