提交 a60b34fd 编写于 作者: S Sam Brannen

Merge pull request #476 from platan/master

Update MockRestServiceServer example in reference manual
......@@ -20618,7 +20618,7 @@ requests and provide "stub" responses:
RestTemplate restTemplate = new RestTemplate();
MockRestServiceServer mockServer = MockRestServiceServer.createServer(restTemplate);
mockServer.expect(requestTo("/greeting")).andRespond(withSuccess("Hello world", "text/plain"));
mockServer.expect(requestTo("/greeting")).andRespond(withSuccess("Hello world", MediaType.TEXT_PLAIN));
// use RestTemplate ...
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册