当前位置: 代码迷 >> 综合 >> springboot项目jar包启动报错:java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlType
  详细解决方案

springboot项目jar包启动报错:java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlType

热度:34   发布时间:2024-01-03 14:40:54.0

今天使用idea将项目打包运行,但是启动不起来,一查日志发现了一些奇奇怪怪的错误

报错显示

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.

java.lang.NoClassDefFoundError:javax/xml/bind/annotation/XmlType

解决

加入依赖

<dependency><groupId>javax.xml.bind</groupId><artifactId>jaxb-api</artifactId><version>2.2.12</version>
</dependency>

可能原因: 大概是jdk版本引起的问题,安装这个依赖即可,初学者不求甚解

参考链接

https://blog.csdn.net/returnzhang/article/details/80864896

  相关解决方案