You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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.9 relies on an older version of micrometer-core, which doesn’t include the Validated class you’re missing
  • micrometer-registry-elastic:1.5.1 requires a newer micrometer-core that 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

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.08 08:17:54