I want to Create custom query which will depend on number of Fields will get from @RequestParam Like
public List<User> method(
@RequestParam("key") String []key,
@RequestParam("value") String [] value){}
Then I have to create a query in Service layer according to number of element I'll get in key and value
For example in first array(in key) element is "UserName" then in value array I'll get (value of username)
In these arrays, the number of fields will be dynamic. After that I have to pass that whole query String in Repository of Springboot & retrieve data from mongodb database.