springboot版本升级导致webservice调用失败org.apache.cxf.common.jaxb.JAXBUtils.createMininumEscapeHandle
很感謝這位作者的文章https://blog.csdn.net/q340505050518/article/details/105394315
近期對項目版本進行升級
原項目版本
從 Springcloud alibaba 2.1.0? ?Spring cloud? Greenwich? ? SpringBoot 2.1.3版本升級,
一開始升級的版本是:
Springcloud alibaba 2.2.0.RELEASE?? ?Spring cloud? Hoxton.SR1? ? ?SpringBoot 2.3.0
但是此時其他測試無問題,以為一切順利
但是在一次webservice調用外部服務時,發現調用失敗,拋出如下異常:
?
org.apache.cxf.common.jaxb.JAXBUtils.createMininumEscapeHandler(Ljava/...
后來經過百度,以及CXF官網FAQ 可能遇到問題解決辦法
初步判斷為springboot 版本和CXF版本不匹配導致,認為Springboot版本較高
選擇降低版本
調整架構版本為
Springcloud alibaba 2.2.1.RELEASE?? ?Spring cloud? Hoxton.SR3? ? ?SpringBoot 2.2.5.RELEASE
CXF版本選擇為使用最多的3.2.4版本
并對原CXF 3.2.4版本中的core包進行exclusion
如下:
<!-- webService--><!-- cxf框架依賴 --><dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-spring-boot-starter-jaxws</artifactId><version>${cxf-spring-boot-starter-jaxws.version}</version><exclusions><exclusion><artifactId>cxf-core</artifactId><groupId>org.apache.cxf</groupId></exclusion></exclusions></dependency><dependency><groupId>org.apache.cxf</groupId><artifactId>cxf-core</artifactId><version>3.2.6</version></dependency>總結
以上是生活随笔為你收集整理的springboot版本升级导致webservice调用失败org.apache.cxf.common.jaxb.JAXBUtils.createMininumEscapeHandle的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 矩形波如何傅立叶展开_金科文化会不会连续
- 下一篇: python字符串计算加减乘除代码_Py