运行springboot项目出现:Type javax.xml.bind.JAXBContext not present
作者:互联网
问题:运行springboot项目出现:Type javax.xml.bind.JAXBContext not present
原因
java9+版本以后,JAXB默认没有加载
手动添加模块到pom:
spring boot 2.0.*版本,添加如下代码:
———————————————— <!-- jaxb模块引用 - start --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> </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>2.3.0</version> </dependency> <dependency> <groupId>javax.activation</groupId> <artifactId>activation</artifactId> <version>1.1.1</version> </dependency> <!-- jaxb模块引用 - end --> ————————————————
转自:https://blog.csdn.net/alger_magic/article/details/83041811
标签:xml,JAXBContext,springboot,jaxb,bind,2.3,javax 来源: https://www.cnblogs.com/herojava/p/12236779.html