请勿使用 com.sun.xml.internal.bind.* 包中的 API

该规则标志着使用 com.sun.xml.internal.bind.* 打包。 在 Java SE 11 中不再提供这些包。 这些包是内部包,不能供外部使用。 不过,如果应用程序必须继续使用这些软件包,一个可行的解决方案是 使用 com.sun.xml.bind.* 包,并在应用程序中包含所需的 jaxb 依赖库。 库。 下面是一个 maven 依赖关系文件示例,用于调入 所需的库,以使用 com.sun.xml.bind.* 包装

<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-core</artifactId>
    <version>2.2.11</version>
</dependency>
<dependency>
    <groupId>com.sun.xml.bind</groupId>
    <artifactId>jaxb-impl</artifactId>
   <version>2.2.11</version>
</dependency>

该规则具有自动修复功能,可替换对 com.sun.xml.internal.bind.* 转换成 com.sun.xml.bind.*.将 自定义配置复制到应用程序构建文件,以启用修复自动化。

有关 Java 11 更改的更多信息,请参阅 The Java 11 Migration Guide。 有关移除 com.sun.xml.bind 目录的更多信息,请参阅 JEP 条目中的 Removal of the Java EE and CORBA Modules