此代码用于完美地用于RESTEasy。随着ProxyFactory和ClientExecutor的弃用,我需要选项。
PoolingClientConnectionManager connectionManager = new PoolingClientConnectionManager();
DefaultHttpClient httpClient = new DefaultHttpClient(connectionManager);
ClientExecutor clientExecutor = new ApacheHttpClient4Executor(httpClient);
MyClass client = ProxyFactory.create(MyClass.class, "http://localhost", clientExecutor);