I am tried to implement search filter using Querydsl. my search filter functionality is working fine.But I tested this by giving hard coded values in controller.
Now I want to take that search parameter from Angular application. In get request how to receive this parameters from angularsClientAcctId, sAcctDesc,sInvestigatorName,sClientDeptId
Can any one please suggest me how to do that?
AccountController.java
@GetMapping("/findAccountData")
public ResponseEntity<List<Tuple>> populateGridViews(String sClientAcctId, String sAcctDesc,String sInvestigatorName,String sClientDeptId) throws Exception {
return ResponseEntity.ok(accService.populateGridViews(sClientAcctId, sAcctDesc,sInvestigatorName,sClientDeptId));
}
I tried like this using @PathVariable
but here I need to pass all parameters then only request is matching other wise I am getting 404
My functionality is that If I didn't pass any parameters then I want all data, if I pass only one parameters then search according to that parameter value like that
@GetMapping("/findAccountData/{clientAcctId}/{acctDesc}/{investigatorName}/{clientDeptId}")
public ResponseEntity<List<Tuple>> populateGridViews(
@PathVariable("clientAcctId") String sClientAcctId,
@PathVariable("acctDesc") String sAcctDesc,
@PathVariable("investigatorName") String sInvestigatorName ,
@PathVariable("clientDeptId") String sClientDeptId) throws Exception {