yookue / multiple-minio-spring-boot-starter

Multiple minio for spring boot starter

Home Page:https://mvnrepository.com/artifact/com.yookue.springstarter/multiple-minio-spring-boot-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple Minio Spring Boot Starter

Spring Boot application integrates multiple minio quickly, which is a high performance object Storage.

Quickstart

  • Import dependencies
    <dependency>
        <groupId>com.yookue.springstarter</groupId>
        <artifactId>multiple-minio-spring-boot-starter</artifactId>
        <version>LATEST</version>
    </dependency>

By default, this starter will auto take effect, you can turn it off by spring.multiple-minio.enabled = false

  • Configure Spring Boot application.yml with prefix spring.multiple-minio
spring:
    multiple-minio:
        primary:
            host: '192.168.0.1'
            port: 9000
            secure-http: true
            access-key: 'foo1'
            secret-key: 'bar1'
            bucket-name: 'app1'
        secondary:
            host: '192.168.0.2'
            port: 9000
            secure-http: true
            access-key: 'foo2'
            secret-key: 'bar2'
            bucket-name: 'app2'
        tertiary:
            host: '192.168.0.3'
            port: 9000
            secure-http: true
            access-key: 'foo3'
            secret-key: 'bar3'
            bucket-name: 'app3'

This starter supports 3 MinioClient at most. (Three strikes and you're out)

  • Configure your beans with the following bean by @Autowired/@Resource annotation, combined with @Qualifier annotation (take primary as an example)
Bean Type Qualifier
MinioClient PrimaryMinioAutoConfiguration.MINIO_CLIENT

Document

Requirement

  • jdk 17+

License

This project is under the Apache License 2.0

See the NOTICE.txt file for required notices and attributions.

Donation

You like this package? Then donate to Yookue to support the development.

Website

About

Multiple minio for spring boot starter

https://mvnrepository.com/artifact/com.yookue.springstarter/multiple-minio-spring-boot-starter

License:Apache License 2.0


Languages

Language:Java 100.0%