1、在項目跟目錄下建立文件夾,比如libs
2、maven依賴
<dependency><groupId>com.hikvision.ga</groupId><artifactId>artemis-http-client</artifactId><version>1.1.10</version><scope>system</scope><systemPath>${project.basedir}/libs/artemis-http-client-1.1.10.jar</systemPath></dependency>
注意加上 system和 標簽
3、打包配置
<plugin><groupId>org.springframework.boot</groupId><artifactId>spring-boot-maven-plugin</artifactId><version>${spring-boot.version}</version><configuration><mainClass>com.example.videosecurityplatform.xxxx</mainClass><includeSystemScope>true</includeSystemScope><layout>JAR</layout></configuration><executions><execution><id>repackage</id><goals><goal>repackage</goal></goals></execution></executions></plugin>
注意有外部依賴時一定要加上includeSystemScope標簽