No mapping found for HTTP request with URI [/spring_liu/hello.do] in DispatcherServlet with name 
【No mapping found for HTTP request with URI [/spring_liu/hello.do] in DispatcherServlet with name 】落花踏尽游何处,笑入胡姬酒肆中。这篇文章主要讲述No mapping found for HTTP request with URI [/spring_liu/hello.do] in DispatcherServlet with name 相关的知识,希望能为你提供帮助。
控制台一直报No mapping found for HTTP request with URI [/spring_liu/hello.do] in DispatcherServlet with name ‘SpringMVC‘,最后发现是controller没有扫描到
造成的,我这边是xml没有添加组件扫描
< ?xml version="1.0" encoding="UTF-8"?> < beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xmlns:jdbc="http://www.springframework.org/schema/jdbc" xmlns:jee="http://www.springframework.org/schema/jee" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:util="http://www.springframework.org/schema/util" xmlns:jpa="http://www.springframework.org/schema/data/jpa" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.2.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd http://www.springframework.org/schema/data/jpa http://www.springframework.org/schema/data/jpa/spring-jpa-1.3.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.2.xsd"> < !-- 组件扫描 --> < !-- base-package:根包 --> < context:component-scan base-package="cn.tedu.spring" /> < /beans>
推荐阅读
- Saliency Detection: A Spectral Residual Approach
- ???Android???11.0 UI?????????????????????????????????ListView???????????????2
- Android内存泄漏的检测流程捕捉以及分析
- Flutter项目之app升级方案
- Android 如何有效的解决内存泄漏的问题
- 基于cxf的app文件上传接口(带回显功能)
- android 圆角背景
- Android 隐藏输入法键盘
- Android 软键盘的全面解析,让你不再怕控件被遮盖