You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Spring Boot 3迁移时从WSDL生成代码遭遇javax.jws相关包不存在及符号找不到错误的求助

Spring Boot 3迁移时从WSDL生成代码遭遇javax.jws相关包不存在及符号找不到错误的求助

大家好,我最近在把我们的应用迁移到Spring Boot 3版本,结果在从WSDL生成代码的环节碰了壁,报了好几个错误,具体错误信息如下:

package javax.jws does not exist

[ERROR]  package javax.jws.soap does not exist
[ERROR]  cannot find symbol  class WebService
[ERROR]  cannot find symbol symbol: class SOAPBinding

我以为是JAXB相关的依赖没配全,就尝试添加了下面这些依赖,但问题还是没有得到解决:

<dependency>
    <groupId>javax.xml.bind</groupId>
    <artifactId>jaxb-api</artifactId>
    <version>2.3.0</version>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-core</artifactId>
    <version>2.3.0.1</version>
</dependency>

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
    <version>2.3.0</version>
</dependency>
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <version>...(原内容版本号不完整)</version>
</dependency>

有没有朋友遇到过类似的问题?或者能给我指个方向,应该怎么解决这些错误呀?

备注:内容来源于stack exchange,提问作者stackuser

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.15 14:24:31