异常详情:

Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.web.servlet.handler.AbstractHandlerMapping.obtainApplicationContext()Lorg/springframework/context/ApplicationContext;

参考https://blog.csdn.net/u012527870/article/details/81843504,找到原因在于spring的jar包版本冲突

该项目里的spring依赖版本都是5.1.4

<!--参数管理-->
<properties>
<jdk.version>1.8</jdk.version>
<spring.version>5.1.4.RELEASE</spring.version>
</properties> <!--依赖管理-->
<dependencies>
……
<!--spring-->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.version}</version>
</dependency>
…… <!--activemq-->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-all</artifactId>
<version>5.15.8</version>
</dependency>
</dependencies>

而该项目引入的另一个依赖(activemq-all),本身又依赖了另一个版本的spring

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> <groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>5.15.8</version>
<packaging>pom</packaging>
<name>ActiveMQ</name>
<inceptionYear>2005</inceptionYear> <!--这里的spring版本是4.3.18-->
<spring-version>4.3.18.RELEASE</spring-version> ……
</project>

解决方案:

1. 将该项目依赖的spring版本改为4.3.18

2. 在该项目中引入activemq-all依赖时,排除掉spring

最新文章

  1. 异步编程系列第01章 Async异步编程简介
  2. GitHub学习心得之 简单操作
  3. dbm速算
  4. Linux下tmpfs与ramfs的区别
  5. 使用JFinal-weixin配置微信开发
  6. IP地址,子网掩码,默认网关,路由,形象生动阐述
  7. 各种排序算法代码(C语言版)
  8. HDOJ(HDU) 2521 反素数(因子个数~)
  9. 实例学习SSIS(一)--制作一个简单的ETL包
  10. 笔记本光驱位安装固态硬盘及window系统一些过程记录
  11. 【Unity3D技术文档翻译】第1.8篇 AssetBundles 问题及解决方法
  12. Java数据库操作(MySQL与SQLserver)
  13. JavaScript限制前端页面用户表单输入
  14. 7个Java项目,或许你的大学老师就会布置
  15. 10大H5前端框架(转)
  16. php 数字 的简单加解密
  17. signal(SIGCHLD, SIG_IGN)和signal(SIGPIPE, SIG_IGN);
  18. 剑指offer总结
  19. ArcEngine几何变换中的策略模式
  20. STL set集合用法总结(multiset)

热门文章

  1. 批处理遍历文件夹执行git pull
  2. jQuery之排他思想
  3. 封装class类--不分割类名
  4. c++ Socket客户端和服务端示例版本二
  5. 命令行执行php脚本中的$argv和$argc配置方法
  6. i3wm 配置刷新生效 和 使用mod快捷打开 ranger 小贴士
  7. Beta冲刺-(2/3)
  8. Insomni&#39;hack teaser 2019 - Pwn - 1118daysober
  9. fhq_treap || BZOJ 3223: Tyvj 1729 文艺平衡树 || Luogu P3391 【模板】文艺平衡树(Splay)
  10. Apache HttpClient 读取响应乱码问题总结