说明
在使用JDK11
和kisso
的时候报错,如下:
简单说
org.springframework.web.util.NestedServletException:
Handler dispatch failed;
nested exception is java.lang.NoClassDefFoundError: javax/xml/bind/DatatypeConverter
javax/xml/bind/DatatypeConverter
这个类没找到,原因JAXB API是java EE 的API,JDK11删除了这个工具。那么在11中怎么使用呢?
解决方案
解决方案1
降级到JDK1.8,这个当然违背我们的初衷!不得已才选择这样的方式。
解决方案二
添加依赖包
<!-- jaxb依赖包 -->
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>