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