Backend Development 4 min read

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

<code>&lt;dependency&gt;
  &lt;groupId&gt;net.dreamlu&lt;/groupId&gt;
  &lt;artifactId&gt;mica-auto&lt;/artifactId&gt;
  &lt;version&gt;2.3.3&lt;/version&gt;
  &lt;scope&gt;provided&lt;/scope&gt;
&lt;/dependency&gt;
</code>

Gradle >= 5.x

<code>annotationProcessor("net.dreamlu:mica-auto:2.3.3")
</code>

Gradle < 5.x

<code>compileOnly "net.dreamlu:mica-auto:2.3.3"
</code>

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!

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

login 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.