Class PersonController

java.lang.Object
com.deanofwalls.CRUD_DEMO.controller.PersonController

@Controller public class PersonController extends Object
  • Constructor Details

    • PersonController

      @Autowired public PersonController(PersonService service)
  • Method Details

    • create

      @PostMapping("/create") public org.springframework.http.ResponseEntity<PersonModel> create(@RequestBody PersonModel person)
    • readById

      @GetMapping("/read/{id}") public org.springframework.http.ResponseEntity<PersonModel> readById(@PathVariable Long id)
    • readAll

      @GetMapping("/readAll") public org.springframework.http.ResponseEntity<List<PersonModel>> readAll()
    • updateById

      @PutMapping("/update/{id}") public org.springframework.http.ResponseEntity<PersonModel> updateById(@PathVariable Long id, @RequestBody PersonModel newData)
    • deleteById

      @DeleteMapping("/delete/{id}") public org.springframework.http.ResponseEntity<PersonModel> deleteById(@PathVariable Long id)