如果我将以下 Maven 依赖项与 TLS 结合使用,则会收到证书未知错误:
<dependency>
<groupId>org.apache.cxf</groupId>
<type>pom</type>
<artifactId>cxf-spring-boot-starter-jaxrs</artifactId>
<version>3.1.12</version>
</dependency>
如果我使用下面的 Maven 依赖项,那么一切都会按预期工作。:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-rs-client</artifactId>
<version>3.1.12</version>
</dependency>
更糟糕的是,如果我添加以下依赖项,那么我会再次遇到相同的错误:
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-spring-boot-starter-jaxws</artifactId>
<type>pom</type>
</dependency>
我不确定问题是什么,但也许某些 cxf-spring-boot 自动配置确实会产生问题?
最佳答案
我可以验证问题。
区别在于 cxf.xml 配置在任何情况下都不会被使用。
将cxf.xml显式导入到我的spring配置中后,问题就解决了。
关于java - 将 cxf-spring-boot-starter-jaxrs WebClient 与 TLS 一起使用会产生证书未知错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60988280/