找不到具有URI的HTTP请求的映射 - PageNotFound noHandlerFound

时间:2015-10-23 03:52:59

标签: spring spring-mvc

我在春天没什么经验,想在春天开发应用程序。 得到以下错误:

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;
}

1 个答案:

答案 0 :(得分:0)

我认为您为RequestMapping提供的值不正确。你在班级有任何RequestMapping吗?