配置spring+shiro时,启动tomcat报错异常

严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(Ljava/lang/reflect/AnnotatedElement;Ljava/lang/Class;)Z

解决办法:

web.xml拦截器异常

如下web.xml 拦截器代码

  1 <servlet>
2 <servlet-name>DispatcherServlet</servlet-name>
3 <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
4 <init-param>
5 <param-name>contextConfigLocation</param-name>
6 <param-value>classpath:spring/springmvc.xml</param-value>
7 </init-param>
8 <load-on-startup>1</load-on-startup>
9 <async-supported>true</async-supported>
10 </servlet>
11 <servlet-mapping>
12 <servlet-name>DispatcherServlet</servlet-name>
13 <url-pattern>/</url-pattern>
14 </servlet-mapping>
15

查找后得知:web.xml版本号为2.3 修改版本号为3.0即可

org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping的更多相关文章

  1. SSM报错:No converter found for return value of type: class java.util.ArrayList at org.springframework.web.servlet.mvc.method.annotation.AbstractMessageConverterMethodProcessor.writeWithMessageConverter

    我使用的是SSM框架,是在编写测试RESTFUL接口的时候出现, @RequestMapping(value = "/selectAll", method = RequestMet ...

  2. spring 使用@Valid校验数据出错DEBUG org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod - Failed to resolve argument 0 of type

    问题原因:在 @Valid 的那个参数后面紧跟着一个 BindingResult 的参数(一定要紧跟着) 参考来源:https://segmentfault.com/q/101000000838468 ...

  3. Caused by: java.lang.ClassNotFoundException: org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter

    严重: StandardWrapper.Throwableorg.springframework.beans.factory.BeanCreationException: Error creating ...

  4. org.springframework.web.servlet.mvc.multiaction.NoSuchRequestHandlingMethodException

    相信很多的朋友在开发过程中都或多或少的遇见一些异常,下面我给大家说一说NoSuchRequestHandlingMethodException 这个异常说的是找不到处理这样的请求方法,那是什么原因导致 ...

  5. org.springframework.web.servlet.PageNotFound

    2017-07-11 16:36:13.489 WARN [http-nio-8032-exec-16]org.springframework.web.servlet.PageNotFound -Re ...

  6. org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not supported

    1:先上控制台报错信息 org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'PUT' not ...

  7. 【Feign调用异常】org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported

    一.异常场景描述 明明是post请求,为啥到达服务器后就变成了get请求 2019-05-30 18:07:17.055 [http-nio-10650-exec-4] ERROR c.x.xcaut ...

  8. SpringBoot从1.5.1→2.2.4项目加包扫雷三:org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter已过时

    @Configuration@Slf4j@PropertySource({"classpath:/config.properties"})public class MyWebApp ...

  9. org.springframework.web.servlet.DispatcherServlet noHandlerFound

    1 请求URL: http://localhost:8080/mvc/rojas 2 control  RequestMapping  : @RequestMapping(value="xx ...

随机推荐

  1. java取json 的方法

    public static void main(String[] args) { String jsonStr = "[{\"varieties_type\":\&quo ...

  2. wait()与notify()

    一,前言 ​ ​ 简单画了一下线程的流程图,只是一个大概.如图所示,线程有多种状态,那么不同状态之间是如何切换的,下面主要总结关于wait()和notify()的使用. 二,wait() ​ wait ...

  3. Emacs 笔记二

    Emacs 笔记二 Table of Contents 1. 前言 2. emacs基本操作(常用快捷键) 3. emacs模式讲解 4. emacs缓冲区 5. org mode 5.1. 列表 5 ...

  4. 读《深入理解Elasticsearch》点滴-过滤器

    1.过滤器不影响文档得分 2.过滤的唯一目的是用特定筛选条件来缩小结果范围:而查询不仅缩小结果范围,还会影响文档的得分 3.过滤器运行更加高效(因为不用计算得分) 4.通常过滤器使用Bits接口,返回 ...

  5. Vue-cli连接mysql

    本文把前后台一起串起来,前端使用vue-cli后台用nodejs连接数据库,vue-cli请求接口其数据是来自于mysql数据. 一.vue-cli请求接口部分 <template> &l ...

  6. One layer SoftMax Classifier, "Handwriting recognition"

        import lib needed¶ In [1]: from PIL import Image import numpy as np import matplotlib.pyplot as ...

  7. VR中的“寻路(wayfinding)”

    虚拟现实(VR)中很重要的一个问题就是Locomotion(用户在VR中的移动).这个Locomotion分为两种,一种是点对点的,如传送门的方式,一种是包含了可以操控的中间过程的,这种被称为“导航( ...

  8. linux下安装配置go语言环境

    1,golang中国下载go源码  http://www.golangtc.com/download  请对应系统版本号,linux-amd64.tar.gz为64位系统(推荐) ,linux-386 ...

  9. SpringBootSecurity学习(22)前后端分离版之OAuth2.0自定义授权码

    使用JDBC维护授权码 前面的代码中,测试流程第一步都是获取授权码,然后再携带授权码去申请令牌,授权码示例如下: 产生的授权码默认是 6 位的,产生以后并没有做任何管理,可以说是一个临时性的授权码,o ...

  10. iOS 设备数据管理工具 iMazing v2.10.3 绿色便携版

    iMazing 是一款可以帮助用户管理 iOS 设备的软件,功能远远超出 iTunes.iMazing 连接你的 iOS 设备(iPhone. iPad 或 iPod)相连,使用起来也非常的方便.你可 ...