Boost Spring Boot 3.x Compatibility with mica-auto Auto-Generated Starter Configs

This article introduces mica-auto, an annotation‑processor‑based tool that automatically generates Spring Boot starter configuration files—including spring.factories, AutoConfiguration.imports, and java SPI settings—enabling seamless compatibility with Spring Boot 3.x without maintaining separate branches.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
Boost Spring Boot 3.x Compatibility with mica-auto Auto-Generated Starter Configs

1. Introduction

Many open‑source developers create separate branches to keep their starters compatible with Spring Boot 3.x, but this is unnecessary if you avoid the renamed JARs. Using mica-auto can save maintenance and publishing time, giving you more freedom to spend with family and friends.

2. Overview

mica-auto (a Spring Boot starter development tool) generates Spring Boot starter configuration files. It uses an Annotation Processor to scan @Component at compile time and automatically produce the corresponding configuration. mica-auto supports composite annotations and is widely used in the mica, mica‑mqtt, pig, and SpringBlade ecosystems.

3. Features

Automatically generates spring.factories during compilation.

Automatically generates the Spring Boot 3.x AutoConfiguration.imports SPI configuration.

Automatically generates spring-devtools.properties during compilation.

Automatically generates Java SPI configuration, requiring the @AutoService annotation.

4. Usage

Note:

If your project uses Lombok, place the mica-auto dependency after the Lombok dependency.

Maven

<dependency>
  <groupId>net.dreamlu</groupId>
  <artifactId>mica-auto</artifactId>
  <version>2.3.3</version>
  <scope>provided</scope>
</dependency>

Gradle >= 5.x

annotationProcessor("net.dreamlu:mica-auto:2.3.3")

Gradle < 5.x

compileOnly "net.dreamlu:mica-auto:2.3.3"

5. Result

6. Conclusion

mica-auto simultaneously generates spring.factories and the 3.x AutoConfiguration.imports SPI configuration. Both can coexist without conflict, allowing existing starters to be compatible with Spring Boot 3.x without branching or maintaining multiple packages.

To better support Spring Boot 3.2.x, you may also need to add the -parameters compilation flag:

Maven configuration for this flag is shown in the following image:

Using mica-auto to auto‑generate Spring Boot starter configurations frees your hands, prevents missing or incorrect settings, and reduces startup failures. Give it a try today!

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.

Spring BootAnnotation Processorauto-configurationStartermica-auto
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

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.