您的位置:首页 > 理论基础 > 计算机网络

No mapping found for HTTP request with URI

2017-06-09 16:05 483 查看
spring-mvc.xml 文件没有注入controller类

<!-- 自动扫描该包,使SpringMVC认为包下用了@controller注解的类是控制器 -->

<context:component-scan base-package="com.rinlink.intelligent.controller" />

参考网址
http://www.cnblogs.com/qwcbeyond/p/4948586.html
添加这么一段过滤,又出现No mapping found for HTTP request with URI

<mvc:resources location="/" mapping="/**/*.html" />
<mvc:resources location="/" mapping="/**/*.js" />
<mvc:resources location="/" mapping="/**/*.css" />
<mvc:resources location="/" mapping="/**/*.png" />
<mvc:resources location="/" mapping="/**/*.gif" />
<mvc:resources location="/" mapping="/**/*.ttf" />
<mvc:resources location="/" mapping="/**/*.woff" />
<mvc:resources location="/" mapping="/**/*.woff2" />


解决办法就是:

添加一行

<mvc:annotation-driven />
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐