Browse Source

add some clarity to readme

David Ginzberg 7 years ago
parent
commit
f90e25abd3
1 changed files with 5 additions and 2 deletions
  1. 5
    2
      README.md

+ 5
- 2
README.md View File

398
         VoteResult voteResult = new VoteResult();
398
         VoteResult voteResult = new VoteResult();
399
         Iterable<Vote> allVotes = voteRepository.findVotesByPoll(pollId);
399
         Iterable<Vote> allVotes = voteRepository.findVotesByPoll(pollId);
400
 
400
 
401
-        // Algorithm to count votes
401
+        //TODO: Implement algorithm to count votes
402
         return new ResponseEntity<VoteResult>(voteResult, HttpStatus.OK);
402
         return new ResponseEntity<VoteResult>(voteResult, HttpStatus.OK);
403
     }
403
     }
404
 ```
404
 ```
525
 There are two steps needed here to externalize and standardize the validation error messages:
525
 There are two steps needed here to externalize and standardize the validation error messages:
526
 
526
 
527
 - Create a `messages.properties` file in the `src/main/resources` directory with the given properties below
527
 - Create a `messages.properties` file in the `src/main/resources` directory with the given properties below
528
-- Use an autowired `MessageSource` in the `RestExceptionHandler` to set the message on ValidationError objects (ie: `setMessage(messageSource.getMessage(fe,null));` )
528
+  - `messages.properties` is a key-value file stored in plain text. Your IDE may have a table-based view or show the contents as text
529
+  - `.properties` files are a common idiom in Java applications; they contain additional information the application uses that doesn't impact the actual source code.
530
+- Use an autowired `MessageSource` object in the `RestExceptionHandler` to set the message on ValidationError objects (ie: `setMessage(messageSource.getMessage(fe,null));` )
531
+  - This object will be autowired (or injected) the same way your `CRUDRepository` instances are.
529
 
532
 
530
 **`messages.properties` content**:
533
 **`messages.properties` content**:
531
 
534