感谢@payyouyont博主对本篇文章的支持,参考地址
https://blog.csdn.net/pei19890521/article/details/80984707
一.使用maven将springboot项目打成可执行的jar
在pom文件中添加下面的配置
<build>
<!-- 解决idea导入maven工程无法把mapper.xml文件添加到target文件目录下的问题 -->
<resources>
<resource>
<directory>src/main/java</directory>
<includes>
<include>com/zzzy/zc/mapper/*.xml</include>
</includes>
</resource>
<resource>
<directory>src/main/resources</directory>
<includes>
<include>**/*.*</include>
</includes>
</resource>
</resources>
<finalName>ZoomSealLite</finalName>
<plugins>
<!-- 资源文件拷贝插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<!-- java编译插件 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.springfra