Integrating MinIO Object Storage with Spring Boot: Configuration, Code Samples, and API Endpoints
This guide introduces MinIO as an S3‑compatible object storage service and walks through its installation, Maven dependencies, Spring Boot configuration, Java client setup, REST controller implementation for file upload, preview, download, and deletion, and includes debugging screenshots.
MinIO is an open‑source object storage service compatible with Amazon S3, suitable for storing large unstructured data such as images, videos, logs, backups, and container images.
The article explains how to install MinIO on Windows (link provided) and how to add the required Maven dependencies (Lombok, Spring Boot starter web, and the MinIO Java client) in pom.xml.
Configuration properties are set in application.properties to define the maximum file size and the MinIO connection parameters (URL, access key, secret key, bucket name).
A StorageProperty class annotated with Lombok @Data, @Component and @ConfigurationProperties holds these settings.
The MinioClientConfig class creates a singleton MinioClient instance, provides utility methods to check bucket existence, list all buckets, and initialise the client in a @PostConstruct method.
The MinIoController exposes REST endpoints for uploading, previewing, downloading and deleting files, delegating the actual operations to a MinioUtil helper.
Finally, the article shows screenshots of successful file upload, download and deletion on the MinIO console.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Selected Java Interview Questions
A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
