You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Will Feign support "/countries?{queryParamList}" Path pattern #429
I know that currently feign does support @QueryMap to solve dynamic query param values.
Our system is currently using JAXRS + resteasy for REST client framework. We are planning to migrate our framework to FEIGN without making many changes on the Rest Client Interface itself (which is still using JAXRS Annotation).
I know that FEIGN also supporting JAXRS Contract, but it is not 100% backward compatible when I try to migrate from RESTEASY to FEIGN.
One of the scenario that will fail is for such feature that is using below Path pattern :
@GET
@Path(value = "/countries?{queryParamList}")
Country getCountry(@PathParam("queryParamList") String queryParamList);
It resulted as null pointer exception for pattern above.
java.lang.NullPointerException
at feign.RequestTemplate.replaceQueryValues(RequestTemplate.java:605)
at feign.RequestTemplate.resolve(RequestTemplate.java:210)
at feign.ReflectiveFeign$BuildTemplateByResolvingArgs.resolve(ReflectiveFeign.java:294)
at feign.ReflectiveFeign$BuildTemplateByResolvingArgs.create(ReflectiveFeign.java:213)
at feign.SynchronousMethodHandler.invoke(SynchronousMethodHandler.java:72)
My really question is, Will FEIGN also support such pattern in the future ?
If yes, I can contribute my code change for pull request.
I don't think there's anything to say we are 100% compatible with jax-rs,
particularly as jax-rs annotations are meant for the server-side.
Anyway, a NPE like what you've pasted above sounds undesirable. Want to
have a go at fixing it?
Activity
codefromthecrypt commentedon Aug 7, 2016
kdavisk6 commentedon Sep 24, 2018
Closed via #778