获取 PGAdapter
本页介绍了如何获取 PGAdapter 二进制文件。
如需在 JVM 中独立运行 PGAdapter,请下载最新的 jar
文件以及包含所需依赖项的新 lib
目录。
wget https://storage.googleapis.com/pgadapter-jar-releases/pgadapter.tar.gz \
&& tar -xzvf pgadapter.tar.gz
如需在 Docker 容器中运行 PGAdapter,请通过执行以下命令获取最新版本:
docker pull gcr.io/cloud-spanner-pg-adapter/pgadapter
通过将版本附加到标记来获得先前版本。
docker pull gcr.io/cloud-spanner-pg-adapter/pgadapter:v<version-number>
要在处理过程中使用 PGAdapter,请执行以下操作:
通过将以下代码添加到 pom.xml
文件,将 google-cloud-spanner-pgadapter
作为依赖项添加到项目中:
<dependency>
<groupId>com.google.cloud</groupId>
<artifactId>google-cloud-spanner-pgadapter</artifactId>
<version>0.5.1</version>
</dependency>
后续步骤
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2022-06-28 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"很难理解"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"信息或示例代码不正确"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"没有我需要的信息/示例"
},{
"type": "thumb-down",
"id": "translationIssue",
"label":"翻译问题"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"其他"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"易于理解"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"解决了我的问题"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"其他"
}]