Class HeroController
- java.lang.Object
-
- ch.puzzle.libpuzzle.demo.springboot.hero.HeroController
-
@RestController @RequestMapping("hero") public class HeroController extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description HeroController(ApiActions<Hero> actions)
-
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)
-
-
-
Constructor Detail
-
HeroController
public HeroController(ApiActions<Hero> actions)
-
-
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)
-
-