为什么 *.war 文件在部署时没有在云 webapps 中解压?

Why *.war file is not unpack inside cloud webapps when deploy?

我正在尝试使用“IntelliJ IDEA”创建一个 spring-MVC 项目。我在这个项目中创建了一个 .war 文件。为了在 Google Cloud 中发送 war 文件,我使用了“fileZilla”。我的期望是 war 文件应该自动 unpack/extract,一旦我使用 fileZilla 从本地 PC 到云 drag and drop war file。与此同时,我 运行 我的 spring-MVC 程序在浏览器中 运行ning:

143.9.xxx.xxx:8080/nameOfProgramme  

应该可以。但是,当我尝试将 .war 文件从本地传输到云时,.war 文件不会解压。我第一次尝试使用 unzip nameOfProgramme.war 在终端中 运行 它可以解压,但是当我尝试再次上传相同的程序时(首先删除之前的程序)。还是不行。

你们知道如何解决这个问题吗?

您不能像在 TomCat 中那样在 App Engine 中部署 *.war 文件。您可以将项目部署到 GOOGLE APP ENGINE:

Using Maven (recommended)

To deploy your app with Maven, run the following command from your project's top level directory, where the pom.xml file is located.

If you are using the App Engine SDK-based Maven plugin, use the command:

mvn appengine:update

If you are using the Cloud SDK-based Maven plugin, use the command:

mvn appengine:deploy

.....

Using appcfg

To deploy your app, run the appcfg command with the update action and the directory path of your WAR file, for example:

./appengine-java-sdk/bin/appcfg.sh [options] update [WAR_LOCATION]

......

有关完整说明,请参阅 these docs