‫Hi, welcome back. In the previous lecture, we have written a JUnit test to test create employee rest API.
‫In this lecture, we're going to build GET All Employees REST API, and in the next lecture, we're going to write
‫a unit test to test GET All Employees REST API
‫All right.
‫Let's go ahead and let's first build
‫GET All Employees REST API.
‫Well, let's head over to the EmployeeController over here. Within EmployeeController,
‫we gonna write
‫GET All Employees
‫REST API
‫So let's go ahead and
‫let's create a method over here public and the method return type is list of type employee.
‫Let's give method name as get all the employees all right.
‫And this method returns a list of employees, so let's call employee service.
‫it has a method
‫get all employees.
‫All right now we have created the get all employees method, which returns and list of employees.
‫Right?
‫Let's go ahead
‫let's make this method as a rest API.
‫Let's use spring annotation that is @GetMapping annotation
‫that's it.
‫Now we have built Get All Employees Rest API.
‫All right.
‫In next lecture, we're going to write a unit test to test this
‫GET All Employees REST API.
‫I will see you in a next lecture.