8

ProxyFactoryクラスがRestEasyバージョン3.0.0で非推奨とマークされていることに気付きました。残念ながら、このクラスを廃止するアプローチはどこにも文書化されていません。以前はこの方法でサービスを初期化していましたが、新しい方法は何ですか?

protected static final String URL = "http://localhost:12345"+"/api";
protected static final MyService myService = ProxyFactory.create(MyService.class, URL); 
4

1 に答える 1

13

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);
于 2013-09-11T14:34:40.737 に答える