SpringCloud启动Eureka server时报错 java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present

时间:2020-12-19 21:42:54

SpringBoot打开Eureka server时出现以下错误:

java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present

pom文件导入坐标

<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</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>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>