Class PersonController
java.lang.Object
com.deanofwalls.CRUD_DEMO.controller.PersonController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<PersonModel>create(PersonModel person) org.springframework.http.ResponseEntity<PersonModel>deleteById(Long id) org.springframework.http.ResponseEntity<List<PersonModel>>readAll()org.springframework.http.ResponseEntity<PersonModel>org.springframework.http.ResponseEntity<PersonModel>updateById(Long id, PersonModel newData)
-
Constructor Details
-
PersonController
-
-
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
-
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)
-