pom文件引入依赖就好了
<dependency> <groupId>xml-apis</groupId> <artifactId>xml-apis</artifactId> <version>1.4.01</version> </dependency>
参考文章:https://blog.csdn.net/liuchuanhong1/article/details/53453755