我有一个带有 CORSFilter 的纯 API Spring Boot 应用程序。
当我在 google app engine 上部署应用程序时,出现以下屏幕:
但是,URL 给了我这个:
我的完整项目代码is here at GitHUB .
SMSService.java
可能会在编译时出错,因为我必须删除 AWS key 才能将其公开,而他们要求我将其删除。
最佳答案
尝试向您的 app.yaml
添加一个 url hadler:
handlers:
- url: /.*
script: this field is required, but ignored
还有,你从哪个目录部署?您在这两个文件中都有 app.yaml
:
/gcp
gcp/src/main/appengine/
更新:
在 MainController.java
中,为 /
添加一个 url 处理程序:
public class MainController {
@RequestMapping("/")
public String home() {
return "Hello World!";
}
关于spring-boot - Google 应用引擎为我的 spring boot rest api 应用程序提供 404,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52319355/