简体   繁体   English

Spring Boot - 将应用程序部署到 Google Cloud App 引擎但缺少 app.yaml

[英]Spring Boot - Deploy application to Google Cloud App engine but missing app.yaml

I have a problem which I am trying to solve this problem.我有一个问题,我正试图解决这个问题。 I am trying to deploy spring boot application on google cloud app engine, but there is one problem when I try deploy the application I encounter this error below:我正在尝试在谷歌云应用引擎上部署 Spring Boot 应用程序,但是当我尝试部署应用程序时出现了一个问题,我遇到了以下错误:

[INFO] --- spring-boot-maven-plugin:2.0.0.RELEASE:repackage (default) @ royAngularProject ---
[INFO]
[INFO] <<< appengine-maven-plugin:1.3.2:deploy (default-cli) < package @ royAngularProject <<<
[INFO]
[INFO] --- appengine-maven-plugin:1.3.2:deploy (default-cli) @ royAngularProject ---
[INFO] Deleting the staging directory: /home/meodows9992/royAngularProject-spring/target/appengine-staging
[INFO] Staging the application to: /home/meodows9992/royAngularProject-spring/target/appengine-staging
[INFO] Detected App Engine flexible environment application.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.292 s
[INFO] Finished at: 2018-12-09T19:39:14+08:00
[INFO] Final Memory: 22M/140M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy (default-cli) on project royAngularProject: Execution default-cli of goal com.google.cloud.tools:appengine-maven-plugin:1.3.2:deploy failed: java.nio.file
.NoSuchFileException: /home/meodows9992/royAngularProject-spring/src/main/appengine/app.yaml -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
meodows9992@cloudshell:~/royAngularProject-spring (tidy-etching-224411)$  

May I know what should I do to resolve this issue, sorry I unable to post any codes because I don't know where is the problem located and if I need app.yaml I would like to guide me on how do I install it into my project.我可以知道我应该怎么做才能解决这个问题,抱歉我无法发布任何代码,因为我不知道问题出在哪里,如果我需要 app.yaml,我想指导我如何将它安装到我的项目。

A Standard app.yaml confguration for a maven project developed in java8 should look like this;在 java8 中开发的 maven 项目的标准 app.yaml 配置应该如下所示;

 runtime: java env : flex inbound_services: - warmup derived_file_type: - java_precompiled runtime_config: jdk: openjdk8 handlers: - url: /.* script: this field is required, but ignored skip_files: app.yaml

I believe the documentation of Google Cloud platform needs to be simplified.我认为需要简化 Google Cloud 平台的文档。

Create the following location in your project - src/main/appengine and place your app.yaml file there.在您的项目中创建以下位置 - src/main/appengine 并将您的 app.yaml 文件放在那里。

Since it is a Java application you should mention that to get the app engine standard java environment.由于它是一个 Java 应用程序,您应该提到它以获得应用程序引擎标准的 Java 环境。

runtime: java

在此处输入图片说明

Finally Run the below command if you already added the App engine plugin to your POM file.最后,如果您已经将 App 引擎插件添加到您的 POM 文件中,请运行以下命令。

./mvnw -DskipTests appengine:deploy

如果您打算部署 appengine-standard 应用程序,请检查您的 pom.xml 是否包含<packaging>war</packaging>而不是<packaging>jar</packaging>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 谷歌云 SDK:由于 app.yaml 中缺少入口点而无法部署 - Google Cloud SDK: Unable to deploy due to missing entrypoint in app.yaml 使用 Gitlab CI 将 Spring 引导应用程序部署到 Google App Engine? - Deploy Spring Boot application to Google App Engine using Gitlab CI? Google Cloud App Engine - Eclipse 在 app.yaml 中显示“运行时:java 11”不是 Java - Google Cloud App Engine - Eclipse shows "runtime: java 11" in app.yaml is not Java 在 Google Cloud App Engine 上构建 Spring Boot 应用程序的触发器 - Build trigger for Spring Boot application on Google Cloud App Engine 使用应用引擎部署本地主机上的谷歌云应用引擎和 Spring Boot 错误 - google cloud app engine and spring boot bug on localhost deploy with app engine 如何在谷歌云中部署 spring 启动应用程序? - How to deploy a spring boot app in google cloud? Spring 在 Google Cloud App Engine 上启动托管 - Spring Boot hosting on Google Cloud App Engine 如何在 Google Cloud Compute Engine 中部署 Spring Boot 应用程序? - How to deploy Spring Boot application in Google Cloud Compute Engine? 在 Google App Engine 中部署 Spring boot gradle 应用 - Deploy Spring boot gradle app in Google App Engine Bitbucket 到 Google App Engine 部署失败 - 错误:(gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] 不存在 - Bitbucket to Google App Engine Deployment failed - ERROR: (gcloud.app.deploy) [/opt/atlassian/pipelines/agent/build/app.yaml] does not exist
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM