使用Intellij idea15开发SpringMvc遇到的问题
来源:互联网 发布:淘宝怎么看以前的评价 编辑:程序博客网 时间:2024/06/06 15:42
跟着网上的教程使用Intellij IDEA开发SpringMVC一步步做的,搭了一个小程序,一直还是不叫顺利的。
但是到最后运行时提示错误,如下
org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.lang.NoSuchMethodError:
网上查了查,有很多人遇到这个问题,都是springframe引用时,使用了多个版本导致的冲突
看了一下确实是自己引用了很多springframe的东西,因为一直照着教程上做,把他举得例子也放到程序里面了,没看到最后总结的时候说请把你的pom.xml变成下面的样子,
<properties> <spring.version>4.2.6.RELEASE</spring.version> <hibernate.version>5.1.0.Final</hibernate.version></properties>
请在<dependencies>中加入以下依赖:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-webmvc</artifactId> <version>${spring.version}</version> </dependency> <dependency> <groupId>org.springframework.data</groupId> <artifactId>spring-data-jpa</artifactId> <version>1.10.1.RELEASE</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-entitymanager</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>org.hibernate</groupId> <artifactId>hibernate-c3p0</artifactId> <version>${hibernate.version}</version> </dependency> <dependency> <groupId>com.mchange</groupId> <artifactId>c3p0</artifactId> <version>0.9.5.2</version> </dependency> <dependency> <groupId>javax.servlet</groupId> <artifactId>jstl</artifactId> <version>1.2</version> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.39</version> </dependency>
再次运行,终于看到了正确的页面。
0 0
- 使用Intellij idea15开发SpringMvc遇到的问题
- 使用IntelliJ IDEA15.0.4开发spark的简单案例
- 在IntelliJ IDEA中开发springmvc,使用tomcat遇到的问题
- 使用Intellij Idea开发Spark应用遇到的问题
- SpringMVC+tomcat json接口开发,IDE IntelliJ idea遇到的问题汇总
- 使用springmvc遇到的问题
- 使用Intellij进行SpringMVC网站开发问题总结
- springmvc开发中所遇到的问题
- springMVC使用@RequestMapping遇到的问题
- Intellij IDEA15:建立Scala的Maven项目
- Intellij IDEA15:建立Scala的Maven项目
- Intellij 在使用过程中遇到的问题及解决方法
- IntelliJ IDEA 使用svn时遇到的问题总结
- IntelliJ IDEA中使用svn遇到的小问题
- IntelliJ IDEA中使用svn遇到的小问题
- 使用IntelliJ IDEA时遇到的问题总结
- IntelliJ IDEA使用git中遇到的问题
- 第一次使用Java intellij idea遇到的问题
- 物理内存的管理
- slab分配器
- 处理器高速缓存和TLB控制
- 去重命令 - uniq
- 反射应用中获取Class实例的四种方式
- 使用Intellij idea15开发SpringMvc遇到的问题
- 文本统计命令
- sphinx 配置文件全解析
- JSON 解析小例子
- 公司的法律环境
- models.DateTimeField(auto_now_add=True)与models.DateTimeField(auto_now=True)
- [Ext4] Ext4文件系统分析系列文章
- 通讯录之一Transform动画
- django model meta类定义abstract = True