Demo: full CRUD for categories, live
On This Lesson 3 topics
This lesson is planned. The outline below lists the topics it will cover. The full lesson has not been published yet.
In this lesson
build all five category operations end to end. Prepares JNR-019-LAB1.
Draft outline details
Step by step
- Create
CategoryControllerwith a record DTO for create and update, using the in-memory repository. - Implement POST (
201plusLocation) and GET by ID and list. - Implement PUT and DELETE (
204). - Planned mistake: the GET for an unknown ID returns
200with an empty body. Fix: throw a not-found error so the client gets404. - Call every endpoint with
curl -i, then add a@WebMvcTestfor each.
Practice
Apply this lesson with the module's lab, exercises and quiz.
Marking a lesson complete is optional and you can undo it any time. Your progress stays in this browser.