Thursday, 8 August 2013

FIlter data with Spring coming from request

FIlter data with Spring coming from request

I have infromation coming from request such as:
http://localhost:9080/online/accounts/list/usersQuery?uid=ab
and I have to treat this in Spring where the object is uid and the filter
value is ab
so far i have the folowing code in Spring:
@RequestMapping(produces="application/json", value = "/usersQuery",
method=RequestMethod.GET)
public @ResponseBody PagedResources<Resource<UserDetails>>
listItemsSortQuery(@PageableDefault(size = 20, page = 0) Pageable
pageable, PagedResourcesAssembler<UserDetails> assembler) {
Page<UserDetails> lstUserDetails =
userDetailsRepository.findAll(pageable);
return assembler.toResource(lstUserDetails);
}
But it doesnt treat it, what should i chnagein order to filter data
according to the field uid and filter data ab ?
any help would be apreciated.

No comments:

Post a Comment