POI解析Excel表格时,遇到的问题
1 . Duplicate classes: org/apache/xmlbeans/xml/stream/XMLName.class
参考https://issues.apache.org/jira/browse/XMLBEANS-499
在poi-ooxml中将xmlbeans排除,然后单独引入3.0.0版本的xmlbeans即可
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.17</version>
<exclusions>
<exclusion>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
<version>3.0.0</version>
</dependency>