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标签

Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐