Boost Spring Boot Development with mica-auto: Auto-Generate Config Files
The mica-auto Spring Boot starter tool leverages Java Annotation Processors to automatically generate essential configuration files such as spring.factories, AutoConfiguration.imports, aot.factories, and spring‑devtools.properties, supporting Spring Boot 2.7+ and 3.0, and simplifying native image builds with GraalVM.
1. Introduction
mica-auto (a Spring Boot starter development tool) generates Spring Boot starter configuration files and is a basic component of the Mica microservice framework.
mica-auto uses Java Annotation Processors, a technique present since JDK 1.6, which scans annotations at compile time to generate Java code automatically, similar to Lombok.
2. Features
Generate spring.factories .
Support Spring Boot 2.7.x+ new AutoConfiguration annotation, generating entries in AutoConfiguration.imports .
Generate aot.factories to support Spring Boot 3.x GraalVM native image compilation.
Generate spring-devtools.properties .
Generate Java SPI configuration requiring the @AutoService annotation.
3. Update Log
✨ Added support for Spring Boot 3.0.0 aot.factories.
⬆️ Upgraded to Spring Boot 3.0.0.
⬆️ Upgraded to Java 17.
Note: mica-auto does not force a dependency on Spring Boot; it only includes the
spring-boot-configuration-processordependency.
4. What is aot.factories?
aot.factories was introduced in a previous article (see: http://mp.weixin.qq.com/s?__biz=MjM5MzEwODY4Mw==∣=2257488120&idx=1&sn=aee2134406444493b98ef6f162419fd7&chksm=a5e62f5c9291a64ae8aab5c751b6ff4448c64d0da5c56f94b5e3165655872099951460f71bcf&scene=21#wechat_redirect) which explains its purpose.
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.