简体   繁体   English

如何使用 maven 部署多个应用引擎实例?

[英]How to deploy multiple app-engine instances with maven?

I have 2 java springboot services to be deployed to google app-engine (standard env).我有 2 个 java springboot 服务要部署到谷歌应用引擎(标准环境)。 They both work fine and I was able to deploy them both with mvn appengine:deploy .它们都工作正常,我能够使用mvn appengine:deploy部署它们。

However the standard environment automatically assigns a name and version to each service and causes them to overwrite one another.然而,标准环境会自动为每个服务分配一个名称和版本,并导致它们相互覆盖。

I have already looked into this answer which didn't work in the standard environment.我已经研究过这个在标准环境中不起作用的答案。

How do I deploy multiple services with different names so they don't overwrite one another?如何部署具有不同名称的多个服务,以免它们相互覆盖?

Thanks in advance!提前致谢!

You can specify the name of the service in the appengine-web.xml of each application by adding the <service> element:您可以通过添加<service>元素在每个应用程序的appengine-web.xml中指定服务的名称:

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <runtime>java8</runtime>

  <service>your-service-name</service>

  <threadsafe>true</threadsafe>
</appengine-web-app>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM