java - How to get path parameters and matrix parameters from the following uri string? Uri is /flights/flightid;numberofseats=2/date -
java - How to get path parameters and matrix parameters from the following uri string? Uri is /flights/flightid;numberofseats=2/date -
am trying separate path param , matrix param next uri string in jersey.
/flights/flightid;numberofseats=2/date.
things wanna separate next parameters using jersey
flightid numberofseats datei tried code separate failing miserably.
@get @path(value = "/flight/{flightid}/{date}") @produces(mediatype.text_plain) public response bookflight(@matrixparam("numberofseats") int numberofseats, @pathparam(value = "flightid") int flightid, @pathparam(value = "date") string date) { //logic }
all matrix param examples know carry them @ , of uri. in case regex derived path
eat uri parts , leave nil @pathparam
capture. see section 3.7.3 of jax-rs 2.0 spec.
if possible, move theses parameters end.
or parse flightid (which contain matrix params, think) in own code.
java regex rest jersey
Comments
Post a Comment