我們正在嘗試對我們的應用程式進行一些更新。我們正在使用 build.gradle 檔案并將我們的更新org.springframework.kafka:spring-kafka為2.8.0from 2.7.14。
但是,在執行此更新時,對于使用 lombok 日志記錄的代碼,我們會收到以下錯誤:
error: package org.slf4j does not exist
這很令人困惑,因為我們沒有接觸到龍目島。這是宣告:
compileOnly 'org.projectlombok:lombok:1.18.24'
annotationProcessor 'org.projectlombok:lombok:1.18.24'
我查看了spring-kafka網站的更新,看是否有兼容性問題,但一無所獲。不確定在哪里尋找這個問題,如果有人可以提供幫助。如果有幫助,我們正在使用 java 17。
謝謝
uj5u.com熱心網友回復:
為什么要遷移到 2.8.0?當前的 2.8.x 版本是 2.8.10(2.8.x 今天不再支持 OSS)。
https://spring.io/projects/spring-kafka#learn
https://spring.io/projects/spring-kafka#support
我建議直接進入 2.9.2。
看起來你依賴于kafka-clients...的傳遞依賴
2.7.x
compileClasspath - Compile classpath for compilation 'main' (target (jvm)).
--- org.springframework:spring-context -> 5.3.20
| --- org.springframework:spring-aop:5.3.20
| | --- org.springframework:spring-beans:5.3.20
| | | \--- org.springframework:spring-core:5.3.20
| | | \--- org.springframework:spring-jcl:5.3.20
| | \--- org.springframework:spring-core:5.3.20 (*)
| --- org.springframework:spring-beans:5.3.20 (*)
| --- org.springframework:spring-core:5.3.20 (*)
| \--- org.springframework:spring-expression:5.3.20
| \--- org.springframework:spring-core:5.3.20 (*)
--- org.springframework:spring-messaging -> 5.3.20
| --- org.springframework:spring-beans:5.3.20 (*)
| \--- org.springframework:spring-core:5.3.20 (*)
--- org.springframework:spring-tx -> 5.3.20
| --- org.springframework:spring-beans:5.3.20 (*)
| \--- org.springframework:spring-core:5.3.20 (*)
--- org.springframework.retry:spring-retry:1.3.3
--- org.apache.kafka:kafka-clients:2.7.2
| --- com.github.luben:zstd-jni:1.4.5-6
| --- org.lz4:lz4-java:1.7.1
| --- org.xerial.snappy:snappy-java:1.1.7.7
| \--- org.slf4j:slf4j-api:1.7.30
--- com.google.code.findbugs:jsr305:3.0.2
...
較新的 kafka-clients 只在運行時類路徑上有它。
2.8.x
compileClasspath - Compile classpath for compilation 'main' (target (jvm)).
--- org.springframework:spring-context -> 5.3.23
| --- org.springframework:spring-aop:5.3.23
| | --- org.springframework:spring-beans:5.3.23
| | | \--- org.springframework:spring-core:5.3.23
| | | \--- org.springframework:spring-jcl:5.3.23
| | \--- org.springframework:spring-core:5.3.23 (*)
| --- org.springframework:spring-beans:5.3.23 (*)
| --- org.springframework:spring-core:5.3.23 (*)
| \--- org.springframework:spring-expression:5.3.23
| \--- org.springframework:spring-core:5.3.23 (*)
--- org.springframework:spring-messaging -> 5.3.23
| --- org.springframework:spring-beans:5.3.23 (*)
| \--- org.springframework:spring-core:5.3.23 (*)
--- org.springframework:spring-tx -> 5.3.23
| --- org.springframework:spring-beans:5.3.23 (*)
| \--- org.springframework:spring-core:5.3.23 (*)
--- org.springframework.retry:spring-retry:1.3.4
--- org.apache.kafka:kafka-clients:3.0.2
--- com.google.code.findbugs:jsr305:3.0.2
...
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/534303.html
上一篇:通過lambda問題時,PythonPandasTransform如何在內部作業?
下一篇:將型別“java.lang.String”的屬性值轉換為屬性“onFailureExpression”所需的型別“org.springframework.expression.Expression”
