JDK9+之后使用JXAB

<dependencies>
<!-- jdk9+ requires following dependencies to use jaxb -->
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
module-info.java
module module.name {

requires static transitive java.naming;
requires transitive com.sun.xml.bind;
requires java.annotation;

// 使用到JAXB相关的包暴露给jaxb
opens cn.xiaojianzheng.xxx to com.sun.xml.bind, com.sun.xml.bind.core, jakarta.xml.bind;

}