Spring MVC的简单案例报错:警告: No mapping found for HTTP request with URI [/springMVC/hello2] in DispatcherSe
来源:互联网 发布:淘宝全自动导购机器人 编辑:程序博客网 时间:2024/05/16 15:20
警告: No mapping found for HTTP request with URI [/springMVC/hello2] in DispatcherServlet with name 'hello'
这个错误真的搞疯我了,麻烦帮忙各位大神看看 Spring MVC的问题
我的web.xml如下
<?xml version="1.0" encoding="UTF-8"?><web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"> <display-name>springMVC</display-name> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <!-- Spring MVC配置 --><servlet> <servlet-name>hello</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>hello</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <!-- <filter> <filter-name>CharacterFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>CharacterFilter</filter-name> <url-pattern>*.html</url-pattern> </filter-mapping> --></web-app>
我的 hello-servlet.xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd"> <!-- <mvc:default-servlet-handler/> //HandlerMapping <bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/> //HandlerAdapter <bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/> // 注册处理器 <bean name="hello" class="com.xin.test.HelloWorldController"/> --> <context:component-scan base-package="com.xin.text.HelloController" /> <mvc:annotation-driven /> <bean name="/springMVC.html" class="com.xin.text.HelloWorldController"></bean> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/" /> <property name="suffix" value=".jsp"/> </bean><!-- 对模型视图名称的解析,在请求时模型视图名称添加前后缀 <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/> <property name="prefix" value="/"/> <property name="suffix" value=".jsp"/> </bean> 启动注解驱动的Spring MVC功能,注册请求url和注解POJO类方法的映射 <mvc:annotation-driven /> 启动包扫描功能,以便注册带有@Controller、@Service、@repository、@Component等注解的类成为spring的bean <context:component-scan base-package="com.xin" /> --> </beans>
0 0
- Spring MVC的简单案例报错:警告: No mapping found for HTTP request with URI [/springMVC/hello2] in DispatcherSe
- 警告: No mapping found for HTTP request with URI [/Springmvc/test] in DispatcherServlet with dispatche
- spring框架的项目报错:No mapping found for HTTP request with URI [ ] in DispatcherServlet with name 'spring'
- Spring MVC No mapping found for HTTP request with URI
- Spring MVC------No mapping found for HTTP request with URI
- Spring mvc No mapping found for HTTP request with URI
- springMVC报WARNING: No mapping found for HTTP request with URI [/springMVC/hello] in DispatcherServle
- springMVC 报404 No mapping found for HTTP request with URI [/ssmAngular/student/toIndex] in Dispatch
- 警告: No mapping found for HTTP request with URI [/web002/list.do] in DispatcherServlet 的解决方法
- spring mvc No mapping found for HTTP request with URI [] in DispatcherServlet
- 解决spring mvc No mapping found for HTTP request with URI错误的三种方法
- 解决spring mvc No mapping found for HTTP request with URI错误的三种方法
- 警告: No mapping found for HTTP request with URI [] in DispatcherServlet with name
- 警告: No mapping found for HTTP request with URI [/springmv/iew] in DispatcherServlet with name 'sprin
- 关于警告: No mapping found for HTTP request with URI [/spMVC/] in DispatcherServlet with name 'spMVC'的问题
- mark springmvc [No mapping found for HTTP request with URI]
- springMVC No mapping found for HTTP request with URI
- springMVC No mapping found for HTTP request with URI
- 浅谈Autolayout-01简介
- 该网页脚本造成Internet Explorer运行速度减慢!若继续运行会更慢,至无法响应!
- Part2:Unity学习笔记十二 - Space Shooter(从视频最后一课向Done_Main.unity场景修改的过程)
- AspNetPager的一些属性
- spring AspectJ的Execution表达式-备忘笔记
- Spring MVC的简单案例报错:警告: No mapping found for HTTP request with URI [/springMVC/hello2] in DispatcherSe
- 文章标题
- Http 中Connection: close和Connection: keep-alive有什么区别?
- Unity3d 官方资源Car的主控脚本CarController翻译与详解
- EM算法 - 2 - EM算法在高斯混合模型学习中的应用
- c++开发ocx入门实践一
- hdu 3836 Equivalent Sets
- 先验概率、后验概率以及共轭先验
- 信号与系统3:单位阶跃,单位响应以及系统性质