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

运行Springcloud项目报错
java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present
经过排查,发现就是JDK的环境的问题,我的JDK不是版本是java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present
解决办法:在pom.xml中加入依赖

 <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>
java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not presentjava.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present 丁七岁 发布了18 篇原创文章 · 获赞 23 · 访问量 1208 私信 关注
上一篇:解决报错java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present


下一篇:解决报错java.lang.TypeNotPresentException: Type javax.xml.bind.JAXBContext not present