我的 spring-boot 项目中的一个特定依赖项存在一些问题。我正在使用 netty-tcnative-boringssl-static 并将我的 spring-boot 版本从 2.0.5 升级到 2.1.3,现在我收到以下我无法破译的错误消息:
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call the method io.netty.internal.tcnative.SSLContext.setCipherSuite(JLjava/lang/String;Z)Z but it does not exist. Its class, io.netty.internal.tcnative.SSLContext, is available from the following locations:
jar:file:/C:/Users/xxx/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.12.Final/netty-tcnative-boringssl-static-2.0.12.Final.jar!/io/netty/internal/tcnative/SSLContext.class
It was loaded from the following location:
file:/C:/Users/xxx/.m2/repository/io/netty/netty-tcnative-boringssl-static/2.0.12.Final/netty-tcnative-boringssl-static-2.0.12.Final.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of io.netty.internal.tcnative.SSLContext
我不完全理解此错误消息,说明的路径是相同的,在我的类路径上我可以找到具有请求方法的库。
我认为可能是由于某种原因 netty-tcnative-boringssl-static 与 spring-boot >2.1.0 不兼容。错误消息中的方法签名让我感到困惑。
setCipherSuite(JLjava/lang/String;Z)Z
java代码中会是什么样子?我有权访问的方法具有此签名public static boolean setCipherSuite(long ctx, String ciphers)
。
我不确定这是否是真正的不匹配,如果不是,那么我没有想法,如果是,那么我可以通过摆弄不同的版本来解决它。
有人知道吗?