【问题标题】:SpringBoot 3.0.0-M1 + SpringCloud 2022.0.0-M1 [ERROR] 'dependency.version' for org.springframework.cloud:spring-cloud-starter-sleuth:jar is missingSpring Boot 3.0.0-M1 + Spring Cloud 2022.0.0-M1 [错误] org.springframework.cloud:spring-cloud-starter-sleuth:jar 的“dependency.version”缺失
【发布时间】:2022-02-03 03:09:59
【问题描述】:

随着 SpringBoot 3.0.0-M1 和 SpringCloud 2022.0.0-M1 的激动人心的发布,我继续升级版本。

https://spring.io/blog/2022/01/20/spring-boot-3-0-0-m1-is-now-available

https://spring.io/blog/2022/01/27/spring-cloud-2022-0-0-m1-codename-kilburn-has-been-released

虽然在我的 SpringBoot 2.6.3 + Jubilee 上一切正常,但代码完全相同,只是 pom 文件上的版本更改为新的一对 SpringBoot 3.0.0-M1 + SpringCloud 2022.0.0-M1,即观察到以下错误。

/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home/bin/java -Dmaven.multiModuleProjectDirectory=abc -Dmaven.home=maven3 [...] -Didea.version=2021.3.1 clean install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-sleuth:jar is missing. @ line xx, column 21
[ERROR] 'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-sleuth-zipkin:jar is missing. @ line xx, column 21
 @ 

根据 Spring Cloud 官方文档:

Spring Cloud Sleuth

Spring Cloud Sleuth’s last minor version is 3.1. You can check the 3.1.x branch for the latest commits.

The core of this project got moved to Micrometer Tracing project and the instrumentations will be moved to Micrometer and all respective projects (no longer all instrumentations will be done in a single repository.

我很难理解。这是否意味着从 3.0/2022.0 起,不再有 Sleuth 了?我们需要改用千分尺吗?

请问如何保留 Sleuth 提供的现有功能?

谢谢

【问题讨论】:

  • 是不是意味着从 3.0/2022.0 开始,就没有 Sleuth 了?我们需要改用千分尺吗?。正确,如果您阅读过,您会看到 sleuth 的所有仪器都将移至千分尺跟踪项目。此外,您可能需要重新考虑升级,因为这些“只是”里程碑版本,还没有准备好生产。

标签: java spring-boot spring-cloud-sleuth


【解决方案1】:

我很难理解。这是否意味着从 3.0/2022.0 起,不再有 Sleuth 了?我们需要改用千分尺吗?

是的

请问如何保留 Sleuth 提供的现有功能?

我们将通过千分尺和千分尺跟踪为这些人提供支持。

这是否意味着我们可以从 pom 文件中删除 Sleuth 依赖项,而是添加/替换为千分尺,事情会一样,仍然有效吗?

如果您没有任何自定义 Sleuth 配置,那么您不应该做任何事情来让可观察性发挥作用。如果您有自定义 Sleuth 配置,则需要将其移植到 Micrometer Tracing,它本质上是 Sleuth 的副本,因此应该主要是包更改。如果您在进行 Brave 自定义,那么您很可能无需更改任何内容。

【讨论】:

  • 谢谢@Marcin。在我接受答案之前。这是否意味着我们可以从 pom 文件中删除 Sleuth 依赖项,而是添加/替换为千分尺,事情会一样,仍然有效吗?
  • 更新了答案
  • 非常感谢马辛
猜你喜欢
  • 2022-08-13
  • 2019-01-26
  • 2016-02-23
  • 1970-01-01
  • 2015-09-03
  • 2020-06-08
  • 2021-08-13
  • 2021-04-02
  • 1970-01-01
相关资源
最近更新 更多