Commit 48cbf25e authored by Srinivas Kota's avatar Srinivas Kota

skota@nisum.com::epe-001:: promotion engine :: code clean up in resource file.

parent 3f98dc7e
......@@ -16,20 +16,20 @@ public class Resource {
@RequestMapping("/saveEmployeeDetails")
public void saveEmployeeDetails(@RequestBody Employee employee) {
System.out.println("Save Employee details");
//System.out.println("Save Employee details");
buildEmployeeDetails().add(employee);
employees.forEach(System.out::println);
System.out.println(employee.toString());
//System.out.println(employee.toString());
}
@RequestMapping("/getEmployeeDetails")
public void getmployeeDetails(@RequestParam String employeeName) {
System.out.println("Get Employee details");
//System.out.println("employeeName = " + employeeName);
List<Employee> employeeList = buildEmployeeDetails().stream()
.filter(employee -> employee.getEmpName().equalsIgnoreCase(employeeName))
.collect(Collectors.toList());
employeeList.forEach(System.out::println);
System.out.println(employeeName);
// System.out.println(employeeName);
}
private List<Employee> buildEmployeeDetails() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment