浏览代码

Update README.md

Git-Leon 6 年前
父节点
当前提交
ac27b5369b
没有帐户链接到提交者的电子邮件
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2
    2
      README.md

+ 2
- 2
README.md 查看文件

327
 
327
 
328
 
328
 
329
 ```java
329
 ```java
330
-@RequestMapping(value="/polls/{pollId}/votes", method=RequestMethod.GET)
330
+@RequestMapping(value="/polls/votes", method=RequestMethod.GET)
331
 public Iterable<Vote> getAllVotes() {
331
 public Iterable<Vote> getAllVotes() {
332
 	return voteRepository.findAll();
332
 	return voteRepository.findAll();
333
 }
333
 }
336
 * Create a `getVote` method in the `VoteController`
336
 * Create a `getVote` method in the `VoteController`
337
 
337
 
338
 ```java
338
 ```java
339
-@RequestMapping(value="/polls/votes", method=RequestMethod.GET)
339
+@RequestMapping(value="/polls/{pollId}/votes", method=RequestMethod.GET)
340
 public Iterable<Vote> getVote(@PathVariable Long pollId) {
340
 public Iterable<Vote> getVote(@PathVariable Long pollId) {
341
 	return voteRepository.findById(pollId);
341
 	return voteRepository.findById(pollId);
342
 }
342
 }