Skip to content

Commit bd1ae00

Browse files
authored
Merge pull request vert-x3#250 from hyeonsangjeon/ProxyHelper-deprecated
Changing ProxyHelper class methods in vert.x3.5.0
2 parents 959575a + 2f0d5ab commit bd1ae00

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

spring-examples/spring-worker-example/src/main/java/io/vertx/example/spring/worker/BookRestApi.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
import io.vertx.ext.web.RoutingContext;
2424
import io.vertx.ext.web.handler.BodyHandler;
2525
import io.vertx.ext.web.handler.StaticHandler;
26-
import io.vertx.serviceproxy.ProxyHelper;
26+
import io.vertx.serviceproxy.ServiceProxyBuilder;
2727
import org.slf4j.Logger;
2828
import org.slf4j.LoggerFactory;
2929
import org.springframework.stereotype.Component;
@@ -45,7 +45,7 @@ public class BookRestApi extends AbstractVerticle {
4545

4646
@Override
4747
public void start(Future<Void> startFuture) throws Exception {
48-
bookAsyncService = ProxyHelper.createProxy(BookAsyncService.class, vertx, BookAsyncService.ADDRESS);
48+
bookAsyncService = new ServiceProxyBuilder(vertx).setAddress(BookAsyncService.ADDRESS).build(BookAsyncService.class);
4949

5050
Router router = Router.router(vertx);
5151

spring-examples/spring-worker-example/src/main/java/io/vertx/example/spring/worker/SpringWorker.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
import io.vertx.core.AbstractVerticle;
2020
import io.vertx.core.Future;
21-
import io.vertx.serviceproxy.ProxyHelper;
21+
import io.vertx.serviceproxy.ServiceBinder;
2222
import org.slf4j.Logger;
2323
import org.slf4j.LoggerFactory;
2424
import org.springframework.beans.factory.annotation.Autowired;
@@ -45,7 +45,7 @@ public class SpringWorker extends AbstractVerticle {
4545

4646
@Override
4747
public void start(Future<Void> startFuture) throws Exception {
48-
ProxyHelper.registerService(BookAsyncService.class, vertx, bookAsyncService, BookAsyncService.ADDRESS).completionHandler(ar -> {
48+
new ServiceBinder(vertx).setAddress(BookAsyncService.ADDRESS).register(BookAsyncService.class, bookAsyncService).completionHandler(ar ->{
4949
if (ar.succeeded()) {
5050
LOG.info("SpringWorker started");
5151
startFuture.complete();

0 commit comments

Comments
 (0)