Closed alex-oos closed 4 months ago
目前尚未推送至maven中央仓库, 里面类比较少,建议自行clone到本地install,或者直接将代码复制到工程里
快乐小王子 @.***> 于2024年4月16日周二 12:33写道:
com.zto.zop zopsdk 0.11 — Reply to this email directly, view it on GitHub https://github.com/ZTO-Express/zopsdk-java/issues/14, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANNKZM2D7WEQZOO7ZBZD3TY5SSZVAVCNFSM6AAAAABGIRMRUCVHI2DSMVQWIX3LMV43ASLTON2WKOZSGI2DKMBXGAZDGNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>
我已经找到解决方案了,将项目打包之后,然后将包放到我自己项目本地,用maven的方式引入,即可
<dependency>
<groupId>com.zto.zop</groupId>
<artifactId>zopsdk</artifactId>
<version>0.11</version>
<scope>system</scope>
<systemPath>${pom.basedir}/src/main/resources/libs/zopsdk-0.11.jar</systemPath>
</dependency>
打包的时候在修改一一下springboot 插件即可,将本地依赖也打包进去
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<!-- Springboot 打包插件-->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>repackage</id>
<configuration>
<!-- 不包含devtools依赖-->
<excludeDevtools>true</excludeDevtools>
<!--包含本地依赖-->
<includeSystemScope>true</includeSystemScope>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
`
`