Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/google-app-engine/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot Google应用程序引擎为我的spring boot rest api应用程序提供404_Spring Boot_Google App Engine_Google Cloud Platform - Fatal编程技术网

Spring boot Google应用程序引擎为我的spring boot rest api应用程序提供404

Spring boot Google应用程序引擎为我的spring boot rest api应用程序提供404,spring-boot,google-app-engine,google-cloud-platform,Spring Boot,Google App Engine,Google Cloud Platform,我有一个带有CORSFilter的纯API Spring启动应用程序。 当我在google app engine上部署应用程序时,会出现以下屏幕: 但是,URL给了我以下信息: 我的完整项目代码 编译时,SMSService.java可能会出现错误,因为我必须删除AWS密钥以使其公开,他们要求我将其删除。尝试向你的app.yaml添加url hadler: handlers: - url: /.* script: this field is required, but ignored

我有一个带有CORSFilter的纯API Spring启动应用程序。
当我在google app engine上部署应用程序时,会出现以下屏幕:

但是,URL给了我以下信息:

我的完整项目代码


编译时,
SMSService.java
可能会出现错误,因为我必须删除AWS密钥以使其公开,他们要求我将其删除。

尝试向你的
app.yaml添加url hadler

handlers:
- url: /.*
  script: this field is required, but ignored
您从哪个目录部署?您在以下两个方面都有
app.yaml
s:

/gcp

gcp/src/main/appengine/

更新:

MainController.java
中,为
/
添加url处理程序:

public class MainController {

    @RequestMapping("/")
    public String home() {
        return "Hello World!";
    }

我已经添加了您描述的处理程序。我正在尝试从/gcp目录部署。我还没找到404。另外,我尝试了两种部署方式,mvn:appengine部署和gcloud应用程序部署,但都没有帮助。它仍然提供404。你能给我你的电子邮件号码或其他通讯方式吗?我想我必须直接和你谈谈,尽早解决这个问题。我也有同样的问题。我已将我的spring rest应用程序部署到app engine flex,并已成功,但我无法访问端点。您面临的确切问题是什么。我能解决它。我不得不重写pom.xml,它成功了。如果您的应用程序在localhost上运行良好,但在AppEngine上给出了404,那么如果缺少,请添加servletilizer.java。创建新的Spring启动项目时,会自动生成Servletilizer。