In Spring Boot, all the HTTP requests are handled by controller classes. To be able to create a RESTful web service, first, we have to create a controller class. We will create our own Java package for our controller:
- Activate the root package in the Eclipse Project Explorer and right-click. Select New | Package from the menu. We will name our new package com.packt.cardatabase.web:
- Next, we will create a new controller class in a new web package. Activate the com.packt.cardatabase.web package in the Eclipse project explorer and right-click. Select New | Class from the menu. We will name our class CarController ...