gpt4 book ai didi

java - Google App Engine SDK 弃用影响我的框架应用程序

转载 作者:行者123 更新时间:2023-12-02 09:36:34 25 4
gpt4 key购买 nike

我有在 Play 框架 1.x 中开发并在 Google 应用引擎标准环境上运行的应用程序。下面是我部署应用程序 GAE 的方式。命令-播放 gae:deploy但此命令内部从 GAE Cloud SDK 调用“appcfg”。

所以现在我必须更改我的部署过程。我尝试按照 Google 文档的建议使用 Cloud SDK 进行部署。基本命令 -“gcloud app deploy”。

我检查了 Google Cloud 文档,发现他们建议使用 Java11 for GAE 标准环境和 app.yaml 文件。

但我现在只想在 GAE 标准环境中使用 Java8。

但是在部署时发出如下警告-

WARNING: Automatic app detection is deprecated and will soon be removed. As an a lternative, create an app.yaml file yourself using the directions at https://clo ud.google.com/appengine/docs/flexible/python/configuring-your-app-with-app-yaml (App Engine Flexible Environment) or https://cloud.google.com/appengine/docs/sta ndard/python/config/appref (App Engine Standard Environment) under the tab for y our language. Deployment to Google App Engine requires an app.yaml file. This command will run gcloud beta app gen-config to generate an app.yaml file for you in the current directory (if the current directory does not contain an App Engine service, please answer "no").

  1. 如果我必须为基于 Java 的 GAE 标准应用程序构建 app.yaml 文件,其结构是什么?

  2. 如果 app.yaml 文件对于 java8 GAE 应用程序来说是不可能的,那么用于使用命令部署此应用程序的 appengine-web.xml 的结构是什么

    "gcloud app deploy" 
  3. 还有一种选择是,我应该迁移基于应用程序 Maven 的应用程序。但现在我不想迁移到maven工具。

最佳答案

他们解释了如何迁移here ,基本上得到Cloud SDK您必须使用 gcloud 而不是 appcfg 命令命令。

对于您的问题:

1 - Java8 标准环境不需要 app.yaml

2 - 要使用 Maven 将 Java8 应用程序部署到 GAE 标准,您将使用 command mvn appengine:部署

3 - 这个documentation解释了如何迁移到基于 CloudSDK 的 Maven 插件。和this one解释了如何迁移到基于 Cloud SDK 的 Gradle 插件

关于java - Google App Engine SDK 弃用影响我的框架应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57465516/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com