Class VotesController

java.lang.Object
info.ejava.examples.svc.docker.votes.controllers.VotesController

@RestController @RequestMapping("/api/votes") public class VotesController extends Object
  • Field Details

  • Constructor Details

    • VotesController

      public VotesController()
  • Method Details

    • createVotes

      @PostMapping(consumes="application/json", produces="application/json") public org.springframework.http.ResponseEntity<VoteDTO> createVotes(@RequestBody VoteDTO newVote)
    • getTotalVotes

      @GetMapping(path="total", produces="text/plain") public org.springframework.http.ResponseEntity<String> getTotalVotes()
    • getVotes

      @GetMapping(produces="application/json") public org.springframework.http.ResponseEntity<org.springframework.data.domain.Page<VoteDTO>> getVotes(@RequestParam(value="offset",defaultValue="0") int offset, @RequestParam(value="limit",defaultValue="0") int limit)