I am new to using Spring boot framework. I want to create a @GetMapping where based on what user enters in the parameter either Property1 Name(String) or Protery2 Designation(String) or Property3 Salary(Integer) the method should be able to get the List of employees based on one or more properties. I can create individual methods but I do not want to do that. I want to do something like this:
@GetMapping("/employee")
public List<Employee> getEmployee(Params parameters)
{
// Filter the list based on parameters provided and return the list
}
Also, I am not understanding how to handle parameters for example, if it is an integer there is only one column but if the user enters string there are two columns. If the user does not specify the parameter name I have to handle that.