【发布时间】:2015-10-23 03:52:58
【问题描述】:
我在春季的经验很少,想在春季开发一个应用程序。 收到以下错误:
Oct 23, 2015 1:13:37 AM org.springframework.web.servlet.PageNotFound noHandlerFound
WARNING: No mapping found for HTTP request with URI [/<app>/admin/device/admin/device/getClosestReviewers] in DispatcherServlet with name 'app'
以这种方式调用 url, http://localhost:8080/app/admin/device/getClosestReviewers?deviceId=5b0d9a27-b0f8-43c9-8a4f-59cc1ba63653&radius=6
我错过了什么,我尝试了几种方法,但似乎没有任何效果
@RequestMapping(method = RequestMethod.GET, value = "/getClosestReviewers", produces = "application/json")
public JSONResponse getClosestReviewers(@RequestParam("deviceId") String deviceId,@RequestParam("radius") int radius) {
JSONResponse response = new JSONResponse();
return response;
}
【问题讨论】:
-
将你的 web.xml 和 spring 上下文文件添加到你的帖子中,然后它会给出清晰的图片。
标签: spring spring-mvc