Jersey bean validation parameterNameProvider

I read the docs in jersey bean validation . The ParameterNameProvider example shows how to determine the parameter names for a method. However, the implementation looks like it should be done for each method, which obviously does not scale. An example is basically useless as it is.

Is there a smarter way to do this? Could Jersey infer a name from @QueryParam or @PathParam ?

+2
java jersey jax-rs
Mar 21 '14 at 18:45
source share
1 answer

Take a look at the answer in my question here. He should do exactly what you want.

Is it possible to change the property path in the ConstraintValidator argument for a method?

If you copy my code and run it through the debugger, you will see that it is evaluated only once for each method for which it is used. Then, during the normal operation of your application, the names will not be resolved again.

+3
Mar 22 '14 at 1:23
source share



All Articles