Skip to content

Instantly share code, notes, and snippets.

@raviyasas
Created December 17, 2021 19:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save raviyasas/25310d0a442fb7b0d4b2030cd60bc7df to your computer and use it in GitHub Desktop.
Save raviyasas/25310d0a442fb7b0d4b2030cd60bc7df to your computer and use it in GitHub Desktop.
@RestController
@RequestMapping("/api/employee")
public class EmployeeController {
@Autowired
public EmployeeController(EmployeeService employeeService){
this.employeeService=employeeService;
}
private EmployeeService employeeService;
@GetMapping("/getEmployees")
public List<Employee> getAllEmployees(){
return employeeService.getEmployees();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment