我尝试使用Ajax调用rest服务时出现404错误

时间:2017-07-13 14:28:11

标签: java ajax spring rest deployment

当我尝试使用Ajax调用rest服务时显示404错误。

战争文件名:文件

服务器端网址映射,

@RequestMapping(method = RequestMethod.POST, value =  "/document/document/download.ws")
    public HttpEntity<DownloadDocumentResponse> downloadDocument(
            @RequestBody final DownloadDocumentRequest downloadDocumentRequest) throws Exception {
        final DownloadDocumentResponse downloadDocumentResponse = documentWs.downloadDocument(downloadDocumentRequest);
        downloadDocumentResponse.setApplicationContext(null);
        return new ResponseEntity<DownloadDocumentResponse>(downloadDocumentResponse, HttpStatus.OK);

    }

客户端网址:&#34;网络错误:404未找到 - http://localhost:8080/document/document/download.ws&#34;

1 个答案:

答案 0 :(得分:0)

我认为这是一个路径错误。您的域的路径未正确写入