• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing Query Params in Rest Service using Spring

 
Ganesh Kumar C V
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - I am creating a REST service and I need to parse the incoming request which contains variable number of query params. I was using @PathVariable when I defined standard number of arguments in the rest method. Now the service receives all the inputs via query params and I need a way to parse this. Can anyone help me in this?

Thanks
Ganesh
 
Ivan Krizsan
Ranch Hand
Posts: 2198
1
  • 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
Would it be possible for you to give actual examples of the scenarios you want to support concerning parameters?
Best wishes!
 
Ganesh Kumar C V
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ivan - I have used @RequestParam to do this. I am just new to spring and rest... I just googled a bit more to find this. Anyways thanks for your reply.

Thanks
Ganesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic