How to set timeout to JAX-RS client with CXF

后端 未结 3 1161
死守一世寂寞
死守一世寂寞 2021-01-08 00:26

I am working on a Rest Client and I am using CXF with JAX-RS.

The problem that I have is that I cannot find any way to override th

3条回答
  •  情深已故
    2021-01-08 01:16

    HTTPConduit conduit = WebClient.getConfig(webClient).getHttpConduit();
    conduit.getClient().setConnectionTimeout(1000 * 3);
    conduit.getClient().setReceiveTimeout(1000 * 3);
    

提交回复
热议问题