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

标签 java linux spring-boot google-cloud-platform

我有一个问题,我正在尝试解决这个问题。我正在尝试在谷歌云应用引擎上部署 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)$  

请问我应该怎么做才能解决这个问题,抱歉我无法发布任何代码,因为我不知道问题出在哪里,如果我需要 app.yaml,我想指导我如何做将它安装到我的项目中。

最佳答案

在 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

我认为 Google Cloud 平台的文档需要简化。

关于java - Spring Boot - 将应用程序部署到 Google Cloud App 引擎但缺少 app.yaml,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53691962/

相关文章:

java - 使用 Apache Camel 和 spring-ws 组件调用基于 SOAP 的服务

java - 循环->数组输出

java - 如何在java中创建自上而下的重载构造函数

java - 读写 COM 端口?

java - 如何获取android信号强度

java.lang.IllegalArgumentException : Not a managed type in spring boot app

java - 如何指定要使用的基于操作系统的 Java 库?

c++ - 问题编译 C++ 源

linux - 线程亲和性与进程亲和性

java - Spring Boot - 外键 PostgreSQL 数据库中的空值