No mapping found for HTTP request with URI [/SpringMVC/user.do] in DispatcherServlet with name 'springDispatcherServlet'

如果排除了主要配置问题,还可能的原因是

1.未加入<mvc:annotation-driven/>

<mvc:annotation-driven>
<mvc:message-converters>
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>text/plain;charset=UTF-8</value>
</list>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>

2.如果自定义注解过滤器,可能是为加入Controller注解:

<context:component-scan base-package="com.spdb.framework,com.spdb.system"
use-default-filters="false">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Repository" />
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Service" />
<!-- <context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller"/> -->
</context:component-scan>

或者去掉use-default-filters="false"属性,直接使用默认的:

<context:component-scan base-package="com.spdb.framework,com.spdb.system"/>如此即可

3.springmvc需要jstl.jar

SpringMVC错误小结的更多相关文章

  1. springmvc错误 Spring3.X jdk8 java.lang.IllegalArgumentException

    最近在学习springmvc--碰到一个特别蛋疼的错误 javax.servlet.ServletException: Servlet.init() for servlet springMVC thr ...

  2. SpringMVC知识点小结

    SpringMVC: 1.SpringMVC和Spring的关系: 软件开发的三层架构: web层[表示层.表现层]---->Service层---->Dao[DataBase Acces ...

  3. (转)Springboot+shiro配置笔记+错误小结

    springboot不像springmvc,它没有xml配置文件,那该如何配置shiro呢,其实也不难,用java代码+注解来解决这个问题.仅以此篇记录我对shiro的学习,如有对过客造成不便,实在抱 ...

  4. Springboot+shiro配置笔记+错误小结

    软件152 尹以操 springboot不像springmvc,它没有xml配置文件,那该如何配置shiro呢,其实也不难,用java代码+注解来解决这个问题.仅以此篇记录我对shiro的学习,如有对 ...

  5. SpringMVC学习小结

    配置web.xml: <servlet> <servlet-name>dispatcherServlet</servlet-name> <servlet-cl ...

  6. Springboot+shiro配置笔记+错误小结(转)

    软件152 尹以操 springboot不像springmvc,它没有xml配置文件,那该如何配置shiro呢,其实也不难,用java代码+注解来解决这个问题.仅以此篇记录我对shiro的学习,如有对 ...

  7. SpringMVC错误,商品添加信息HTTP Status 400 – Bad Request

    记录一个自己在做商品信息显示与传递数据的时候出现的错误, HTTP Status 400 – Bad Request Type Status Report Description The server ...

  8. <转>Python运行的17个时新手常见错误小结

    1)忘记在 if , elif , else , for , while , class ,def 声明末尾添加 :(导致 “SyntaxError :invalid syntax”) 该错误将发生在 ...

  9. libc++abi.dylib: terminate_handler unexpectedly threw an exception错误小结

    说法一: 我们在运行xcode工程时,有时候会遇到”libc++abi.dylib: terminate_handler unexpectedly threw an exception”错误,app莫 ...

随机推荐

  1. MySql下载

    一般企业办的mysql下载不到 1.准备 注册一个orcle账号 2.跳转到http://www.mysql.com/ ,然后点击Downloads导航栏 滚动到最下面并点击[Community(GP ...

  2. Golang教程:指针

    什么是指针 指针是存储一个变量的内存地址的变量. 在上图中,变量 b 的值是 156,存储在地址为 0x1040a124 的内存中.变量 a 存储了变量 b 的地址.现在可以说 a 指向b. 指针的声 ...

  3. webapi 权限控制解决方案

    随着移动互联网的发展,webapi的应用越来越广泛,本文是笔者总结的webapi的认证校验案例,欢迎指出 案例分为两个功能: 1.用户登录,传入账号和密码到api服务器,然后服务器使用FormsAut ...

  4. 行内元素的margin只能左右有效。上下无效。

    行内元素的margin只能左右有效.上下无效.

  5. [转载]ZendStudio格式化html错位问题修正

    原文链接leeon.me ZendStudio提供的HTML编辑功能感觉很强大,有时候觉得比dw更加人性化,而且整合php在一个编辑器上编写前端会方便很多,以前每次通过zend格式化html代码都会奇 ...

  6. sb追加网页(在追加中添加C#代码)

     “+代码+”

  7. SSM面试

    Spring两大核心:IOC AOP DI AOP:所谓面向切面变成,是一种通过预编译和运行期动态化代理的方式实现了再不修改源代码的情况下给程序动态添加功能的技术. Mybatis(半自动化实现obj ...

  8. Spring系列之Alias标签的解析与使用

    <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

  9. sharepint 2013 添加subsite

    在用服务器端对象模型往里面添加subsite的时候,照着书上的代码,结果,失败.报错 not suported language. bing了半天,说是语言未支持,又是修改系统区域,显示语言等,还是失 ...

  10. Qt 资料大全

    https://blog.csdn.net/liang19890820/article/details/51752029 简述 发福利了.发福利了.发福利了,重要的事情说三遍... 为了方便更多Qte ...