Spring Boot 1.5.5集成Micrometer Elastic启动报错求助
Fixing ClassNotFoundException for
io.micrometer.core.instrument.config.validate.Validated in Spring Boot 1.5.5 + Micrometer Legacy Hey there, I’ve run into similar version mismatch headaches with Micrometer and older Spring Boot versions before—let’s break this down and get your app running.
The Root Cause
The error boils down to mismatched Micrometer dependency versions:
micrometer-spring-legacy:1.3.9relies on an older version ofmicrometer-core, which doesn’t include theValidatedclass you’re missingmicrometer-registry-elastic:1.5.1requires a newermicrometer-corethat does contain this class
When Maven resolves dependencies, it pulls in the older core version from the legacy starter first, leaving the Elastic registry module without the class it needs to initialize.
The Fix: Align All Micrometer Versions
You need to ensure every Micrometer-related dependency uses the same version. Since you’re on Spring Boot 1.5.5, stick with Micrometer 1.3.x (the last major version compatible with Spring Boot 1.x). Here’s your updated POM:
<dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-spring-legacy</artifactId> <version>1.3.9</version> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-elastic</artifactId> <version>1.3.9</version> <!-- Match this to the legacy starter version --> </dependency>
Quick Extra Tips
- Spring Boot 1.5.x doesn’t include native Micrometer dependency management, so you’ll have to manually keep all Micrometer modules in sync going forward.
- If you ever want to use newer Micrometer versions (1.4+), you’ll need to upgrade your Spring Boot app to 2.x first—those versions drop support for Spring Boot 1.x entirely.
内容的提问来源于stack exchange,提问作者Chris Rothe
相关产品推荐
相关产品推荐

