Hi
On 05/09/13 20:09, David Hay wrote:
Hi,

I have a group of RESTful endpoints that all require the same
pre-validation (eg ensuring that the related domain object exists).

Is it possibly to set up an interceptor that is somehow configured to
perform such validation for a set of methods/classes/urls?

If not, is there a suggested way to accomplish this?

Starting from CXF 2.7.x you can use JAX-RS 2.0 NameBinding to attach ContainerRequestFilter to individual methods or classes, and the filters can also check request URI and ignore the validation if needed.

ContainerRequestFilter with a @PreMatch annotation can be used to do the validation before the match has been done

Cheers, Sergey

thanks!


Reply via email to