Boost Spring Boot Development with mica-auto: Auto-Generate Starter Configurations
mica-auto is a Spring Boot starter tool that uses annotation processing to automatically generate configuration files such as spring.factories, AutoConfiguration.imports, and spring-devtools.properties, supporting Kotlin meta‑annotations and Java SPI, with Maven and Gradle integration instructions and version compatibility details.
1. Introduction
mica-auto (Spring Boot starter tool) is used to generate Spring Boot starter configuration files. It employs an Annotation Processor to scan
@Componentat compile time, automatically creating the appropriate configuration and supporting composite annotations. mica-auto is widely used in the mica, mica-mqtt, pig, and SpringBlade ecosystems.
2. Features
Generate
spring.factories.
Support Spring Boot 2.7.x new AutoConfiguration annotation, generating entries in the new
AutoConfiguration.importsconfiguration.
Generate
spring-devtools.properties.
Generate Java SPI configuration, requiring the
@AutoServiceannotation.
3. Update Log
✨ Support Kotlin meta‑annotation (GitHub #8), thanks to @Sunrise66 for feedback.
Version info:
Version 3.1.2 – Spring Boot 3.x – Java 17
Version 2.3.3 – Spring Boot 1.x ~ 3.x – Java 1.8
Note: mica-auto does not enforce a Spring Boot dependency; it only bundles
spring-boot-configuration-processorfor convenience.
4. Usage
Note:If your project uses
Lombok, place the mica-auto dependency after Lombok.
Maven
<code><dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-auto</artifactId>
<version>${mica-auto.version}</version>
<scope>provided</scope>
</dependency>
</code>Gradle >= 5.x
<code>annotationProcessor("net.dreamlu:mica-auto:$micaAutoVersion}")</code>Gradle < 5.x
<code>compileOnly "net.dreamlu:mica-auto:$micaAutoVersion"</code>5. Effect
Using mica-auto to automatically generate Spring Boot starter configurations frees your hands and prevents missing or incorrect configurations that could cause service startup failures. Give it a try!
Java Architecture Diary
Committed to sharing original, high‑quality technical articles; no fluff or promotional content.
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.