Class HeroController


  • @RestController
    @RequestMapping("hero")
    public class HeroController
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.http.ResponseEntity<HeroDto> create​(@Valid HeroDto dto)  
      org.springframework.http.ResponseEntity<java.lang.Void> delete​(long id)  
      org.springframework.http.ResponseEntity<HeroDto> find​(long id)  
      org.springframework.http.ResponseEntity<java.util.List<HeroDto>> list()  
      org.springframework.http.ResponseEntity<HeroDto> update​(long id, @Valid HeroDto dto)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • list

        @GetMapping
        public org.springframework.http.ResponseEntity<java.util.List<HeroDto>> list()
      • find

        @GetMapping("{id}")
        public org.springframework.http.ResponseEntity<HeroDto> find​(@PathVariable
                                                                     long id)
      • create

        @PostMapping
        public org.springframework.http.ResponseEntity<HeroDto> create​(@RequestBody @Valid
                                                                       @Valid HeroDto dto)
      • update

        @PutMapping("{id}")
        public org.springframework.http.ResponseEntity<HeroDto> update​(@PathVariable
                                                                       long id,
                                                                       @RequestBody @Valid
                                                                       @Valid HeroDto dto)
      • delete

        @DeleteMapping("{id}")
        public org.springframework.http.ResponseEntity<java.lang.Void> delete​(@PathVariable
                                                                              long id)