Spring Boot REST API — The Big Picture
July 24, 2025
Task 4: an Item REST API backed by MySQL — Create, Read, Update, Delete items over HTTP. Spring Boot generates most of it; you write very little Java by hand.
The four pieces
Keep this map in your head — a Spring Boot project is just these four files:
application.properties— tells the app how to connect to MySQL.Item.java(Entity) — a Java class that mirrors one row of the table.ItemRepository.java(Repository) — gives you ready-madesave/find/deletemethods for free.ItemController.java(Controller) — the web links (URLs) the examiner tests.
The IndexNo rule
Everywhere you see
IndexNo, replace it with your actual index number. If your index isMS2024001, the project is namedMS2024001and the package becomescom.example.MS2024001.
The build order
- spring-boot-create-project — generate the project with the 4 dependencies.
- spring-boot-mysql-setup — create the DB, restore the backup, connect.
- spring-boot-entity — the
Itementity class. - spring-boot-repository-controller — the repository + CRUD controller.
- spring-boot-run-and-test — run, test, and the marking checklist.