1. 下载jar包,放置到项目的某一目录中
2. pom.xml文件,指定scope和systemPath
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-main</artifactId>
<version>17.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/lib/gt-main-17.1.jar</systemPath>
</dependency>
3. pom.xml中插件属性修改
project-build-plugins
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.1.9.RELEASE</version>
<configuration>
<mainClass>com.test.SpringbootApplication</mainClass>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>