Master Mica Microservice Suite: Versions, Prometheus Integration & Code Samples
This article introduces the Mica microservice component suite, outlines its latest versions and compatibility with Spring Boot and Spring Cloud, details recent updates—including Prometheus support, Swagger enhancements, and dependency upgrades—and provides Maven, Gradle, and configuration examples for integrating Mica-prometheus, alert webhooks, and custom event handling.
1. Mica (Microservice Component Suite)
micais a collection of microservice components designed for out‑of‑the‑box use, simplifying integration and reducing pitfalls. It currently includes over 40 components, many of which are already integrated.
2. Version Information
Latest 2.5.4 – Mica 2.5.x – Spring Boot 2.5.x – Spring Cloud 2020
Latest 2.4.10 – Mica 2.4.x – Spring Boot 2.4.x – Spring Cloud 2020
Latest 2.1.1-GA – Mica 2.0.x~2.1.x – Spring Boot 2.2.x~2.3.x – Spring Cloud Hoxton
Note: Mica does not enforce Spring Cloud as a dependency; except for mica-jobs and mica-prometheus, other components can be used in ordinary Spring Boot projects.
3. Update Log
✨ Added mica-prometheus module supporting HTTP SD and alert webhook.
✨ mica-swagger now supports v3 annotation @Tag and added v3 annotations.
✨ Code optimization for mica-logging.
✨ Added caching to GitHub Actions.
📝 Updated module diagram.
📝 Added English README (Summer 2021).
⬆️ Upgraded Spring Native to 0.10.2.
⬆️ Upgraded Spring Boot to 2.5.4.
⬆️ Upgraded mica-auto to 2.1.3 to fix multi‑module incremental compilation.
⬆️ Upgraded jsoup to 1.14.2 (no longer supports older versions).
⬆️ Upgraded knife4j to 3.0.3.
⬆️ Upgraded jfinal to 4.9.16.
4. Key Notes
The mica-prometheus component facilitates Spring Cloud services connecting to Prometheus via http_sd and alert webhook, supporting both servlet and webflux. It is recommended to integrate it into non‑business services such as Spring Boot Admin. (See Prometheus HTTP SD documentation.)
Maven
<dependency>
<groupId>net.dreamlu</groupId>
<artifactId>mica-prometheus</artifactId>
<version>${version}</version>
</dependency>Gradle
compile("net.dreamlu:mica-prometheus:${version}")http‑sd Configuration
- job_name: micax-cloud
honor_timestamps: true
scrape_interval: 15s
scrape_timeout: 10s
metrics_path: /actuator/prometheus
scheme: http
http_sd_configs:
- url: 'http://{ip}:{port}/actuator/prometheus/sd'Effect Diagram
Alert Webhook
receivers:
- name: "alerts"
webhook_configs:
- url: 'http://{ip}:{port}/actuator/prometheus/alerts'
send_resolved: trueCustom Event Listener
@Async
@EventListener
public void onAlertEvent(AlertMessage message) {
// handle alert webhook message
}5. Mica Ecosystem
mica-auto (Spring Boot starter): https://gitee.com/596392912/mica-auto
mica-weixin (JFinal Weixin Spring Boot starter): https://gitee.com/596392912/mica-weixin
mica-mqtt (MQTT component based on t‑io): https://gitee.com/596392912/mica-mqtt
Spring Cloud microservice HTTP/2 solution (h2c): https://gitee.com/596392912/spring-cloud-java11
mica-security (Mica permission system, Vue rewrite in progress): https://gitee.com/596392912/mica-security
6. Documentation
Mica source code on Gitee: https://gitee.com/596392912/mica
Mica source code on GitHub: https://github.com/lets-mica
Official documentation site: http://wiki.dreamlu.net
Yuque documentation (subscribe for updates): https://www.yuque.com/dreamlu
7. Follow Us
More exciting content recommended daily!
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.
