Building RESTful APIs with Spring Boot
This chapter focuses on building RESTful APIs using Spring Boot. You will learn how to create basic REST controllers, return JSON responses, handle path variables and query parameters, and implement CRUD operations for your application.
Lessons and practices
Create your First REST Controller
Update REST Endpoint to Return JSON Object
Add a New REST Endpoint
Returning JSON from Spring Boot
Refactor Recipe Model to Use Java Records
Customize JSON Serialization for Recipe POJO
Path Variables and Query Parameters
Refactor to Use Optional in @RequestParam
Fix Path Variable in Recipe Controller
Endpoint for Fetching Recipe by Category and ID
Handling Query Parameters in Spring Boot
CRUD Endpoints in Spring Boot
Setting Common URL Prefix in the RecipeController
Fixing Bug in RecipeController's POST and PUT Methods
Implement POST /recipes Endpoint
Implement PUT /recipes/{id} Endpoint
Implement DELETE /recipes/{id} Endpoint
Exploring CRUD with ResponseEntity
Add ResponseEntity to POST /recipes Endpoint
Add ResponseEntity to PUT /recipes Endpoint
Add ResponseEntity to DELETE /recipes Endpoint
Interested in this course? Learn and practice with Cosmo!
Practice is how you turn knowledge into actual skills.