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.

Selected Java Interview Questions
Selected Java Interview Questions
Selected Java Interview Questions
Integrating MinIO Object Storage with Spring Boot: Configuration, Code Samples, and API Endpoints

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.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

JavaBackend DevelopmentSpring Bootfile uploadMinioobject storage
Selected Java Interview Questions
Written by

Selected Java Interview Questions

A professional Java tech channel sharing common knowledge to help developers fill gaps. Follow us!

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.