我遇到一个问题,我使用maven,Spring MVC和GAE创建了一个Web应用程序。
它在本地开发服务器上工作正常,我想部署到云端。 但是对我来说这是不好的要求
EXCEPTION java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
我已经在pom.xml中添加了依赖
<properties>
<spring.version>4.1.1.RELEASE</spring.version>
<appengine.app.version>1</appengine.app.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<prerequisites>
<maven>3.1.0</maven>
</prerequisites>
<dependencies>
<!-- Compile/runtime dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>1.9.17</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
<scope>compile</scope>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>1.9.17</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>1.9.17</version>
<scope>test</scope>
</dependency>
</dependencies>
是否无法获取我的WEB-INF / lib / * .jar?
我错过了什么吗? THX答案 0 :(得分:1)
您必须将所有JARS放在WEB-INF / lib的根文件夹中。 WEB-INF / lib文件夹中不应该有任何其他文件夹。