Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the substitue for Resteasy ProxyFactory class

Tags:

java

resteasy

I just realized that the ProxyFactory class is marked deprecated in RestEasy version 3.0.0. Sadly the approach that deprecates this class is not documented anywhere. I used to initialize my services this way but what is the new way?

protected static final String URL = "http://localhost:12345"+"/api";
protected static final MyService myService = ProxyFactory.create(MyService.class, URL); 
like image 770
allprog Avatar asked Jul 25 '13 12:07

allprog


1 Answers

RESTEasy 3.0.2.Final ( http://howtodoinjava.com/2013/08/03/jax-rs-2-0-resteasy-3-0-2-final-client-api-example/ )

ResteasyClient client = new ResteasyClientBuilder().build();

ResteasyWebTarget target = client.target(URL);

MyService myService = target.proxy(MyService .class);
like image 181
pico633 Avatar answered Sep 20 '22 17:09

pico633