Java 8 已停止支援,並將於 2026 年 1 月 31 日
淘汰。淘汰後,您將無法部署 Java 8 應用程式,即使貴機構先前使用機構政策重新啟用舊版執行階段的部署作業也一樣。現有的 Java 8 應用程式在
淘汰日期後,仍會繼續執行並接收流量。建議您
改用最新支援的 Java 版本。
從 AppCfg 遷移至 gcloud 指令列
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
AppCfg
是 App Engine SDK 隨附的公用程式指令。
如要協助您將 AppCfg
指令替換為 gcloud CLI 的 gcloud
指令,請參閱下表:
appcfg 指令 |
gcloud 指令列 |
download_app |
已停止支援。針對列出的每個檔案使用 gcloud app versions describe 和 curl 。 |
request_logs |
gcloud app logs read 或使用記錄檔探索工具查看及傳送記錄檔 |
rollback |
已停止支援或不再需要 |
start_module_version |
gcloud app versions start |
stop_module_version |
gcloud app versions stop |
update |
適用於 Python 和 PHP 應用程式:
gcloud app deploy
如果是 Java 8 應用程式,請先建構應用程式。然後使用下列指令部署:
gcloud app deploy WEB-INF/appengine.xml
如果是 Java 11 應用程式,您可以將原始碼部署至 Java 11 執行階段,不必在本機建構:
gcloud app deploy pom.xml
如要將 Java fatjar 部署至 Java 11 執行階段,請執行下列步驟:
gcloud app deploy myapp.jar
您也可以使用以 gcloud CLI 為基礎的 Maven 或 Gradle 外掛程式,建構及部署 Java 8 和 Java 11 應用程式。
|
update_indexes |
gcloud app deploy indexes.yaml 或
gcloud datastore indexes create |
update_cron |
gcloud app deploy cron.yaml |
update_dispatch |
gcloud app deploy dispatch.yaml |
update_dos |
gcloud app deploy dos.yaml |
update_queues |
gcloud app deploy queues.yaml |
vacuum_indexes |
gcloud datastore indexes cleanup |
version |
gcloud app versions describe |
set_default_version |
gcloud app services set-traffic |
cron_info |
查看 Google Cloud 控制台的「Cron jobs」(Cron 工作) 頁面。 |
resource_limits_info |
查看 Google Cloud 控制台的「配額」頁面。 |
backends 指令 |
已停止支援。後端服務已停用。 |
list_versions |
gcloud app versions list |
delete_version |
gcloud app versions delete |
migrate_traffic 僅支援 100% 遷移。 |
gcloud app services set-traffic |
如需將 XML 檔案轉換為對等 YAML 檔案的協助,請使用:
gcloud beta app migrate-config cron-xml-to-yaml MY-CRON-XML-FILE.xml
gcloud beta app migrate-config datastore-indexes-xml-to-yaml MY-INDEX-XML-FILE.xml
gcloud beta app migrate-config dispatch-xml-to-yaml MY-DISPATCH-XML-FILE.xml
gcloud beta app migrate-config queue-xml-to-yaml MY-QUEUE-XML-FILE.xml
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-09-04 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[[["\u003cp\u003eThe \u003ccode\u003eAppCfg\u003c/code\u003e utility command from the App Engine SDK has been replaced by \u003ccode\u003egcloud\u003c/code\u003e commands within the gcloud CLI.\u003c/p\u003e\n"],["\u003cp\u003eMany former \u003ccode\u003eappcfg\u003c/code\u003e commands are now executed using the \u003ccode\u003egcloud app\u003c/code\u003e command structure, such as deploying, managing versions, and viewing logs.\u003c/p\u003e\n"],["\u003cp\u003eCertain \u003ccode\u003eappcfg\u003c/code\u003e functionalities, like \u003ccode\u003edownload_app\u003c/code\u003e and \u003ccode\u003erollback\u003c/code\u003e, are no longer supported, with alternatives like viewing source files via the Google Cloud console.\u003c/p\u003e\n"],["\u003cp\u003eThe Backends service, along with its related \u003ccode\u003eappcfg\u003c/code\u003e commands, has been shut down and is no longer supported.\u003c/p\u003e\n"],["\u003cp\u003eXML files used with \u003ccode\u003eappcfg\u003c/code\u003e can be translated into YAML files with the use of \u003ccode\u003egcloud beta app migrate-config\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,[]]