doc(readme): 修改导入方式

This commit is contained in:
lqyan
2024-06-03 19:06:28 +08:00
parent faed08489c
commit 45c1e004af
2 changed files with 12 additions and 23 deletions

View File

@@ -21,7 +21,9 @@
建议在您的项目中使用Jhinno OpenAPI SDK for Java的方法是从Maven中使用它。导入方法如下
添加仓库地址改方案为备用方案后续会上传至Maven中央仓库目前不影响正常使用
方法一通过Maven仓库安装
> 添加仓库地址改方案为备用方案后续会上传至Maven中央仓库目前不影响正常使用
```xml
@@ -45,18 +47,18 @@
</dependency>
```
如果您没有网络,则可以使用以下方法:
方法一通过命令将jar包导入本地Maven仓库
方法二通过命令将jar包导入本地Maven仓库
```shell
# 其中<path-to-file-jar>为jar的路径<path-to-file-source-jar>为源码路径
mvn install:install-file -Dfile=<path-to-file-jar>/jhinno-openapi-java-sdk-1.0.0.jar -DgroupId=com.jhinno -DartifactId=jhinno-openapi-java-sdk -Dversion=1.0.0 -Dpackaging=jar
# 其中<path-to-dir>为jar的路径<path-to-dir>为jar包路径
mvn install:install-file -Dfile="<path-to-dir>/jhinno-openapi-java-sdk-1.0.0.jar" -Dsources="<path-to-dir>/jhinno-openapi-java-sdk-1.0.0-sources.jar"
# 例如
mvn install:install-file -Dfile=D:/jar/jhinno-openapi-java-sdk-1.0.0.jar -DgroupId=com.jhinno -DartifactId=jhinno-openapi-java-sdk -Dversion=1.0.0 -Dpackaging=jar
mvn install:install-file -Dfile="E:/下载/jhinno-openapi-java-sdk-1.0.0.jar" -Dsources="E:/下载/jhinno-openapi-java-sdk-1.0.0-sources.jar"
```
> 注: 其中 jhinno-openapi-java-sdk-x.x.x-sources.jar 为源码包添加可方便查看SDK代码的注释。
> 注:
> - jhinno-openapi-java-sdk-x.x.x.jar 为SDK的jar包。
> - jhinno-openapi-java-sdk-x.x.x-sources.jar 为源码包添加可方便查看SDK代码的注释。
然后在`pom.xml`添加
@@ -69,7 +71,7 @@ mvn install:install-file -Dfile=D:/jar/jhinno-openapi-java-sdk-1.0.0.jar -Dgroup
</dependency>
```
方法:直接在`pom.xml`引用jar(改方法可能会出现一些莫名其妙的问题,所以不建议使用)
方法:直接在`pom.xml`引用jar(改方法可能会出现一些莫名其妙的问题,所以不建议使用)
```xml
<!-- 其中{path-to-file}为jar的位置 -->