No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
来源:互联网 发布:淘宝直通车的使用规则 编辑:程序博客网 时间:2024/05/02 00:29
我在搭建一个Lucene的项目时遇到了这个问题:No mapping found for HTTP request with URI [/myLucene1/index.do] in DispatcherServlet with name 'spring'
产生原因: IndexController类里没有加controller的注解。如下:
...
import org.springframework.web.bind.annotation.RequestParam;
import org.wltea.analyzer.lucene.IKAnalyzer;
public class IndexController {
public static String INDEX_PATH = "C:/Users/Administrator/Desktop/testSearchEngineDemo/createdIndex";
public static String DATA_PATH = "C:/Users/Administrator/Desktop/testSearchEngineDemo/data";
public static Analyzer ANALYZER = new IKAnalyzer();
.....
}
解决办法:在 IndexController类里加上“@Controller”。如下:
...
import org.springframework.web.bind.annotation.RequestParam;
import org.wltea.analyzer.lucene.IKAnalyzer;
@Controller
public class IndexController {
public static String INDEX_PATH = "C:/Users/Administrator/Desktop/testSearchEngineDemo/createdIndex";
public static String DATA_PATH = "C:/Users/Administrator/Desktop/testSearchEngineDemo/data";
public static Analyzer ANALYZER = new IKAnalyzer();
...
}
- No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
- No mapping found for HTTP request with URI [/app17a/] in DispatcherServlet with name 'springmvc'解决方法
- No mapping found for HTTP request with URI [/login.do] in DispatcherServlet with name 'spring'
- No mapping found for HTTP request with URI [/cwgl/department/index] in DispatcherServlet with name
- No mapping found for HTTP request with URI[路径] in DispatcherServlet with name spring3
- No mapping found for HTTP request with URI [/index.html] in DispatcherServlet with name 'springmvc'
- 警告: No mapping found for HTTP request with URI [] in DispatcherServlet with name
- Spring : No mapping found for HTTP request with URI in DispatcherServlet with name "..."
- No mapping found for HTTP request with URI [/chart/get] in DispatcherServlet with name 'SpringMVC‘
- No mapping found for HTTP request with URI [/prjName/contro] in DispatcherServlet with name 'spring'
- No mapping found for HTTP request with URI [/index.do] in DispatcherServlet with name 'SpringMVC‘
- No mapping found for HTTP request with URI in DispatcherServlet with name 'XXX'
- No mapping found for HTTP request with URI [...] in DispatcherServlet with name '...'
- No mapping found for HTTP request with URI [/bdp/] in DispatcherServlet with name
- No mapping found for HTTP request with URI [/] in DispatcherServlet with name 'projectname'
- No mapping found for HTTP request with URI [/exam3/welcome.do] in DispatcherServlet with name 'XXX'
- 警告: No mapping found for HTTP request with URI [/springmv/iew] in DispatcherServlet with name 'sprin
- No mapping found for HTTP request with URI [/xxx] in DispatcherServlet with name 'despatcherServlet'
- How To: 5 Steps to Install phpMyAdmin on Linux
- 宏的作用域
- sendmsg和recvmsg
- android开发时的参考
- N-Queens II
- No mapping found for HTTP request with URI [/...] in DispatcherServlet with name ...的解决方法
- UIAlertView 警告框
- 学习之路
- 为什么__set()和__get()私有了,还是可以执行?
- [191]Number of 1 Bits
- 给字符数组赋值的方法
- leetCode 98:Validate Binary Search Tree
- 初识Android Studio,遇到了太多太多问题
- 蟠桃记