Java 在Endpoints Framework 2.0迁移后访问“WEB-INF”文件夹
AppEngine Endpoints Framework 2.0迁移后,与以前一样,不允许访问Java 在Endpoints Framework 2.0迁移后访问“WEB-INF”文件夹,java,maven,google-app-engine,Java,Maven,Google App Engine,AppEngine Endpoints Framework 2.0迁移后,与以前一样,不允许访问WEB-INF文件夹中的文件 启动dev服务器时引发以下警告 [INFO] GCLOUD: WARNING: Your working directory, (/Users/Name/Endpoint) is not equal to your [INFO] GCLOUD: web application root (/Users/Name/Endpoint/target/endpoint-v1) [
WEB-INF
文件夹中的文件
启动dev服务器时引发以下警告
[INFO] GCLOUD: WARNING: Your working directory, (/Users/Name/Endpoint) is not equal to your
[INFO] GCLOUD: web application root (/Users/Name/Endpoint/target/endpoint-v1)
[INFO] GCLOUD: You will not be able to access files from your working directory on the production server.
pom.xml
文件:
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.endpoints</groupId>
<artifactId>endpoints-framework</artifactId>
<version>2.0.7</version>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${appengine.sdk.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<!-- for hot reload of the web application -->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>endpoints-framework-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<hostname>${appengine.app.id}.appspot.com</hostname>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<webXml>${project.build.directory}/generated-sources/appengine-endpoints/WEB-INF/web.xml</webXml>
<webResources>
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
</resource>
<resource>
<!-- resources in src/main/resources, deployed to WEB-INF/res, not filtered -->
<directory>${basedir}/src/main/resources</directory>
<filtering>false</filtering>
<targetPath>WEB-INF/res</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>com.google.cloud.tools</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>1.3.1</version>
<configuration>
<enableJarClasses>false</enableJarClasses>
<cloudSdkPath>/Applications/google-cloud-sdk</cloudSdkPath>
<port>8080</port>
</configuration>
</plugin>
</plugins>
</build>
com.google.endpoints
端点框架
2.0.7
com.google.appengine
阿彭金试验
${appengine.sdk.version}
测试
${project.build.directory}/${project.build.finalName}/WEB-INF/classes
com.google.cloud.tools
端点框架maven插件
1.0.0
${appengine.app.id}.appspot.com
org.apache.maven.plugins
maven战争插件
2.6
${project.build.directory}/generated sources/appengine endpoints/WEB-INF/WEB.xml
${basedir}/src/main/webapp/WEB-INF
真的
WEB-INF
${basedir}/src/main/resources
假的
WEB-INF/res
com.google.cloud.tools
appengine maven插件
1.3.1
假的
/应用程序/谷歌云sdk
8080