[英]How to deploy a SpringBoot REST Application to Google App Engine?
Tried 试着
Subscribed trial for GoogleAppEngine. GoogleAppEngine的订阅试用版。
1. INSTALLED GOOGLE APP ENGINE SDK
2. Downloaded the sample Java started code and deployed it. Working fine.
3. Used $appcfg.sh -A <appname> update target/appengine-try-java-1.0 to deploy
4. In this case, its a folder with all the webapp related stuffs
Question 题
In my case, I have a spring boot application which generates a jar file. 在我的例子中,我有一个spring boot应用程序,它生成一个jar文件。 It runs with a embedded container and I believe Google may have an alternate to deploy using Docker or some other way.
它使用嵌入式容器运行,我相信Google可能会使用Docker或其他方式进行部署。 But how?
但是怎么样?
There is no pointer or any details on how to run this in Google managed platform as far as I searched. 就我搜索而言,没有指针或任何有关如何在Google托管平台中运行此功能的详细信息。
Any help or reference to documentation!! 任何帮助或参考文档!! Alternates??
候补?
You can now use Google App Engine Java Flexible Environment - Java 8 Runtime : 您现在可以使用Google App Engine Java Flexible Environment - Java 8 Runtime :
https://cloud.google.com/appengine/docs/flexible/java/dev-java-only https://cloud.google.com/appengine/docs/flexible/java/dev-java-only
It is Docker based 它是基于Docker的
UPDATE: 更新:
You can now use Java 8 in App Engine Standard Environment : 您现在可以在App Engine标准环境中使用Java 8:
Tutorial: https://codelabs.developers.google.com/codelabs/cloud-app-engine-springboot/index.html 教程: https : //codelabs.developers.google.com/codelabs/cloud-app-engine-springboot/index.html
Example: https://github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/springboot-appengine-standard 示例: https : //github.com/GoogleCloudPlatform/getting-started-java/tree/master/appengine-standard-java8/springboot-appengine-standard
Blog post: https://cloudplatform.googleblog.com/2017/09/Java-8-on-App-Engine-Standard-environment-is-now-generally-available.html 博客文章: https : //cloudplatform.googleblog.com/2017/09/Java-8-on-App-Engine-Standard-environment-is-now-generally-available.html
Google App Engine still uses Servlet 2.5 that is below the requirements of Spring Boot (ie Servlet 3.0). Google App Engine仍然使用低于Spring Boot(即Servlet 3.0)要求的Servlet 2.5。
There is a way to workaround that, check the documentation for more details 有一种解决方法,请查看文档以获取更多详细信息
Spring Boot requires Servlet 3.0 which GAE does not have. Spring Boot需要GAE没有的Servlet 3.0。 WorkAround is to have a "
spring-boot-legacy
" dependency. WorkAround具有“
spring-boot-legacy
”依赖性。 You can check further how to implement: https://github.com/scratches/spring-boot-sample-gae 您可以进一步查看如何实施: https : //github.com/scratches/spring-boot-sample-gae
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.