💾Thananjhayan
← Back to notes

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-made save / find / delete methods 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 is MS2024001, the project is named MS2024001 and the package becomes com.example.MS2024001.

The build order

  1. spring-boot-create-project — generate the project with the 4 dependencies.
  2. spring-boot-mysql-setup — create the DB, restore the backup, connect.
  3. spring-boot-entity — the Item entity class.
  4. spring-boot-repository-controller — the repository + CRUD controller.
  5. spring-boot-run-and-test — run, test, and the marking checklist.

💬 Comments