标签:color code scope api img jdbc 技术 image ram
最近在搭spring项目框架的时候,遇到一个很伤的问题,翻了很多帖,都报告说什么少spring-context包啊之类的,但实际上spring的那些依赖我根本没漏,下面是我的pom:
<dependencies> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>${junit.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <version>${servlet.version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.google.code.gson</groupId> <artifactId>gson</artifactId> <version>${gson.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-core</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-jdbc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-test</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> </dependencies>
项目在tomcat死活启动不了,搞了老半天,一直在几个配置文件和jar包上纠结,后来直接到发布路径下面去直接找到它,发现jar包没有部署上去(WEB-INF/lib不存在),然后重新修改了一下项目的发布设置:
这时候发现jar包上去了,项目也启动起来了,总算把这茬给搞定了,伤脑筋啊,一开始找的方向不对,始终查不出问题的根源所在,整个项目都差点被推翻重搭了,记下来希望对朋友们有帮助!
spring项目启动错误——java.lang.NoClassDefFoundError: org/springframework/context/ApplicationContext
标签:color code scope api img jdbc 技术 image ram
原文地址:http://www.cnblogs.com/binye-typing/p/6295728.html