mercredi 22 juillet 2015

JAX-RS: Non-programmatical registration of a ClientRequestFilter

I want to use a ClientRequestFilter to modify outgoing requests of my application without changing the source code.

So far, I have only found ways register my filter programmatically:

   Client client = ClientBuilder.newClient(); 
   client.register(new MyClientRequestFilterImpl());
   webtarget =  client.target(uriBuilder);

Is it possible to use the web.xml or similar?

Aucun commentaire:

Enregistrer un commentaire