解决合同模板上传不支持docx问题

dev
wany 2025-03-04 17:24:48 +08:00
parent ac8dff9d48
commit 8b2539c99f
2 changed files with 1727 additions and 190 deletions

View File

@ -4,222 +4,244 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.cowr.ssjygl-xsct-service</groupId> <groupId>com.cowr.ssjygl-xsct-service</groupId>
<artifactId>ssjygl-xsct-service</artifactId> <artifactId>ssjygl-xsct-service</artifactId>
<version>1.0</version> <version>1.0</version>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>砂石经营管理-浠水城投-云端服务</name> <name>砂石经营管理-浠水城投-云端服务</name>
<url>http://www.example.com</url> <url>http://www.example.com</url>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
</properties> </properties>
<!-- 使用阿里 maven 库 --> <!-- 使用阿里 maven 库 -->
<repositories> <repositories>
<repository> <repository>
<id>ali-maven</id> <id>ali-maven</id>
<url>http://maven.aliyun.com/nexus/content/groups/public</url> <url>http://maven.aliyun.com/nexus/content/groups/public</url>
<releases> <releases>
<enabled>true</enabled> <enabled>true</enabled>
</releases> </releases>
<snapshots> <snapshots>
<enabled>true</enabled> <enabled>true</enabled>
<updatePolicy>always</updatePolicy> <updatePolicy>always</updatePolicy>
<checksumPolicy>fail</checksumPolicy> <checksumPolicy>fail</checksumPolicy>
</snapshots> </snapshots>
</repository> </repository>
</repositories> </repositories>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>com.cowr.ssjygl-xsct-common</groupId> <groupId>com.cowr.ssjygl-xsct-common</groupId>
<artifactId>ssjygl-xsct-common</artifactId> <artifactId>ssjygl-xsct-common</artifactId>
<version>1.0</version> <version>1.0</version>
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.jfinal</groupId> <groupId>com.jfinal</groupId>
<artifactId>jfinal</artifactId> <artifactId>jfinal</artifactId>
<version>4.9</version> <version>4.9</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.jfinal</groupId> <groupId>com.jfinal</groupId>
<artifactId>cos</artifactId> <artifactId>cos</artifactId>
<version>2020.4</version> <version>2020.4</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.jfinal</groupId> <groupId>com.jfinal</groupId>
<artifactId>jfinal-undertow</artifactId> <artifactId>jfinal-undertow</artifactId>
<version>2.1</version> <version>2.1</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version> <version>8.0.16</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>druid</artifactId> <artifactId>druid</artifactId>
<version>1.1.22</version> <version>1.1.22</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId> <artifactId>fastjson</artifactId>
<version>1.2.79</version> <version>1.2.79</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>eu.bitwalker</groupId> <groupId>eu.bitwalker</groupId>
<artifactId>UserAgentUtils</artifactId> <artifactId>UserAgentUtils</artifactId>
<version>1.21</version> <version>1.21</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>log4j</groupId> <groupId>log4j</groupId>
<artifactId>log4j</artifactId> <artifactId>log4j</artifactId>
<version>1.2.16</version> <version>1.2.16</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>io.netty</groupId> <groupId>io.netty</groupId>
<artifactId>netty-all</artifactId> <artifactId>netty-all</artifactId>
<version>4.1.48.Final</version> <version>4.1.48.Final</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.quartz-scheduler</groupId> <groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId> <artifactId>quartz</artifactId>
<version>2.3.2</version> <version>2.3.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>de.ruedigermoeller</groupId> <groupId>de.ruedigermoeller</groupId>
<artifactId>fst</artifactId> <artifactId>fst</artifactId>
<version>2.56</version> <version>2.56</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>redis.clients</groupId> <groupId>redis.clients</groupId>
<artifactId>jedis</artifactId> <artifactId>jedis</artifactId>
<version>2.9.0</version> <version>2.9.0</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>fr.opensagres.xdocreport</groupId> <groupId>fr.opensagres.xdocreport</groupId>
<artifactId>xdocreport</artifactId> <artifactId>xdocreport</artifactId>
<version>1.0.6</version> <version>1.0.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId> <artifactId>poi</artifactId>
<version>4.1.2</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-scratchpad</artifactId> <artifactId>poi-scratchpad</artifactId>
<version>4.1.2</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId> <artifactId>poi-ooxml</artifactId>
<version>4.1.2</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId> <artifactId>poi-ooxml-schemas</artifactId>
<version>4.1.2</version> <version>4.1.2</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId> <artifactId>ooxml-schemas</artifactId>
<version>1.4</version> <version>1.4</version>
</dependency> </dependency>
<!-- 避免控制台输出如下提示信息: <!-- 避免控制台输出如下提示信息:
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
项目中实际上用不到这个 jar 包,本项目用不上这个依赖 项目中实际上用不到这个 jar 包,本项目用不上这个依赖
注意eclipse 下可以将 scope 设置为 provided 注意eclipse 下可以将 scope 设置为 provided
--> -->
<dependency> <dependency>
<groupId>org.slf4j</groupId> <groupId>org.slf4j</groupId>
<artifactId>slf4j-nop</artifactId> <artifactId>slf4j-nop</artifactId>
<version>1.7.25</version> <version>1.7.25</version>
<!-- 打包前改成 provided此处使用 compile 仅为支持 IDEA --> <!-- 打包前改成 provided此处使用 compile 仅为支持 IDEA -->
<scope>compile</scope> <scope>compile</scope>
</dependency> </dependency>
</dependencies> </dependencies>
<build> <build>
<finalName>ssjygl-xsct-service</finalName> <finalName>ssjygl-xsct-service</finalName>
<plugins> <plugins>
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version> <version>3.6.1</version>
<configuration> <configuration>
<source>1.8</source> <source>1.8</source>
<target>1.8</target> <target>1.8</target>
<encoding>UTF-8</encoding> <encoding>UTF-8</encoding>
<!-- java8 保留参数名编译参数 --> <!-- java8 保留参数名编译参数 -->
<compilerArgument>-parameters</compilerArgument> <compilerArgument>-parameters</compilerArgument>
<compilerArguments> <compilerArguments>
<verbose/> <verbose/>
</compilerArguments> </compilerArguments>
</configuration> </configuration>
</plugin> </plugin>
<!-- <!--
使用 mvn clean package 打包 使用 mvn clean package 打包
更多配置可参考官司方文档http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html 更多配置可参考官司方文档http://maven.apache.org/plugins/maven-assembly-plugin/single-mojo.html
--> -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>3.1.0</version> <version>3.1.0</version>
<executions> <executions>
<execution> <execution>
<id>make-assembly</id> <id>make-assembly</id>
<phase>package</phase> <phase>package</phase>
<goals> <goals>
<goal>single</goal> <goal>single</goal>
</goals> </goals>
<configuration> <configuration>
<!-- 打包生成的文件名 --> <!-- 打包生成的文件名 -->
<finalName>${project.artifactId}</finalName> <finalName>${project.artifactId}</finalName>
<!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 --> <!-- jar 等压缩文件在被打包进入 zip、tar.gz 时是否压缩,设置为 false 可加快打包速度 -->
<recompressZippedFiles>false</recompressZippedFiles> <recompressZippedFiles>false</recompressZippedFiles>
<!-- 打包生成的文件是否要追加 release.xml 中定义的 id 值 --> <!-- 打包生成的文件是否要追加 release.xml 中定义的 id 值 -->
<appendAssemblyId>true</appendAssemblyId> <appendAssemblyId>true</appendAssemblyId>
<!-- 指向打包描述文件 package.xml --> <!-- 指向打包描述文件 package.xml -->
<descriptors> <descriptors>
<descriptor>package.xml</descriptor> <descriptor>package.xml</descriptor>
</descriptors> </descriptors>
<!-- 打包结果输出的基础目录 --> <!-- 打包结果输出的基础目录 -->
<outputDirectory>${project.build.directory}/</outputDirectory> <outputDirectory>${project.build.directory}/</outputDirectory>
</configuration> </configuration>
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
</plugins> <groupId>org.apache.maven.plugins</groupId>
</build> <artifactId>maven-shade-plugin</artifactId>
<version>3.2.4</version> <!-- 请根据实际情况选择合适的版本 -->
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<artifactSet>
<includes>
<include>**</include> <!-- 包含所有依赖 -->
</includes>
<excludes>
<exclude>**/org/apache/poi/xwpf/converter/core/styles/XWPFStylesDocument.class</exclude> <!-- 排除特定类 -->
</excludes>
</artifactSet>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project> </project>