How mica-auto Simplifies Spring Boot Starter Configuration in Mica Microservices
The article explains mica-auto, a core component of the Mica Spring Cloud microservice framework that automatically generates essential Spring Boot starter configurations, outlines its usage scenarios, features, integration methods for Maven and Gradle, licensing, and provides visual guides for developers.
mica-auto is a basic component of the Mica Spring Cloud microservice framework that generates essential Spring Boot starter configurations.
Usage Scenarios
It mainly prevents package inconsistencies between the main Spring Boot project and its sub‑projects or modules, ensuring proper component scanning.
Custom Spring Boot starter.
Multi‑module projects where sub‑projects should not include mica-auto in the main project.
Features
Generate spring.factories.
Generate spring-devtools.properties.
Generate FeignClient entries in spring.factories for automatic Feign configuration in mica-pro.
Usage
Note: If your project uses Lombok, place the mica-auto dependency after Lombok.
Maven
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-auto</artifactId>
<version>${version}</version>
<scope>provided</scope>
</dependency>Gradle >= 5.x
annotationProcessor("net.dreamlu:mica-auto:${version}")Gradle < 5.x
compileOnly "net.dreamlu:mica-auto:${version}"Diagrams
Adding Dependency
Dependency Build
Build Process
Principle
It scans @Component annotations and automatically generates the corresponding configuration, supporting composite annotations.
Open Source License
LGPL (GNU Lesser General Public License) – allows commercial software to link against the library without open‑sourcing the commercial code, but modifications to the library itself must remain under LGPL.
User Rights
Free to use without source changes for learning, theses, company projects, freelance work, etc.
Modifications that remain closed‑source require the author’s permission.
When referencing, cite: mica-auto https://github.com/lets-mica/mica-auto
References
Google Auto: https://github.com/google/auto
Spring 5 – spring-context-indexer: https://github.com/spring-projects/spring-framework/tree/master/spring-context-indexer
Open Source Recommendation
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.
