build(通用功能): 解决tika和EasyExcel依赖的poi版本冲突问题

--bug=1015442 --user=赵勇 【接口测试】执行带excel文件的接口会报错 https://www.tapd.cn/55049933/s/1215811
This commit is contained in:
fit2-zhao 2022-07-29 18:18:30 +08:00 committed by f2c-ci-robot[bot]
parent 283dd5219b
commit 8ad11c248b
2 changed files with 31 additions and 4 deletions

View File

@ -24,7 +24,8 @@
<mssql-jdbc.version>7.4.1.jre8</mssql-jdbc.version>
<postgresql.version>42.3.2</postgresql.version>
<java-websocket.version>1.5.3</java-websocket.version>
<xmlbeans.version>3.1.0</xmlbeans.version>
<xmlbeans.version>5.1.0</xmlbeans.version>
<poi.version>5.1.0</poi.version>
</properties>
<dependencies>
@ -212,6 +213,20 @@
<groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId>
<version>3.1.1</version>
<exclusions>
<exclusion>
<artifactId>poi</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
<exclusion>
<artifactId>poi-ooxml-schemas</artifactId>
<groupId>org.apache.poi</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
@ -376,6 +391,18 @@
<artifactId>bcprov-jdk15on</artifactId>
<version>1.70</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi.version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi.version}</version>
</dependency>
</dependencies>
<build>

View File

@ -107,13 +107,13 @@ public class ESBParser extends EsbAbstractParser {
String name = "";
if (colorIndex == IndexedColors.LIGHT_GREEN.getIndex()) {
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(204, 255, 204)));
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(204, 255, 204), null));
name = "green";
} else if (colorIndex == IndexedColors.ORCHID.getIndex()) {
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(151, 50, 101)));
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(151, 50, 101), null));
name = "pop";
} else if (colorIndex == IndexedColors.YELLOW.getIndex()) {
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(255, 255, 153)));
style.setFillForegroundColor(new XSSFColor(new java.awt.Color(255, 255, 153), null));
name = "yellow";
} else {
name = "default";