sync reactor-netty

master
Stephane Maldini 9 years ago
parent 13ddfb4aab
commit 530c817287
  1. 3
      spring-web-reactive/src/main/java/org/springframework/http/client/reactive/ReactorHttpClientRequestFactory.java
  2. 5
      spring-web-reactive/src/main/java/org/springframework/http/server/reactive/boot/ReactorHttpServer.java

@ -18,7 +18,6 @@ package org.springframework.http.client.reactive;
import java.net.URI; import java.net.URI;
import reactor.io.netty.ReactiveNet;
import reactor.io.netty.http.HttpClient; import reactor.io.netty.http.HttpClient;
import org.springframework.core.io.buffer.DataBufferAllocator; import org.springframework.core.io.buffer.DataBufferAllocator;
@ -43,7 +42,7 @@ public class ReactorHttpClientRequestFactory implements ClientHttpRequestFactory
} }
public ReactorHttpClientRequestFactory(DataBufferAllocator allocator) { public ReactorHttpClientRequestFactory(DataBufferAllocator allocator) {
this(allocator, ReactiveNet.httpClient()); this(allocator, reactor.io.netty.http.HttpClient.create());
} }
protected ReactorHttpClientRequestFactory(DataBufferAllocator allocator, HttpClient httpClient) { protected ReactorHttpClientRequestFactory(DataBufferAllocator allocator, HttpClient httpClient) {

@ -19,7 +19,6 @@ package org.springframework.http.server.reactive.boot;
import reactor.core.flow.Loopback; import reactor.core.flow.Loopback;
import reactor.core.state.Completable; import reactor.core.state.Completable;
import reactor.io.buffer.Buffer; import reactor.io.buffer.Buffer;
import reactor.io.netty.ReactiveNet;
import org.springframework.core.io.buffer.DataBufferAllocator; import org.springframework.core.io.buffer.DataBufferAllocator;
import org.springframework.core.io.buffer.DefaultDataBufferAllocator; import org.springframework.core.io.buffer.DefaultDataBufferAllocator;
@ -50,8 +49,8 @@ public class ReactorHttpServer extends HttpServerSupport
Assert.notNull(getHttpHandler()); Assert.notNull(getHttpHandler());
this.reactorHandler = new ReactorHttpHandlerAdapter(getHttpHandler(), allocator); this.reactorHandler = new ReactorHttpHandlerAdapter(getHttpHandler(), allocator);
this.reactorServer = (getPort() != -1 ? ReactiveNet.httpServer(getPort()) : this.reactorServer = (getPort() != -1 ? reactor.io.netty.http.HttpServer.create(getPort()) :
ReactiveNet.httpServer()); reactor.io.netty.http.HttpServer.create());
} }
@Override @Override

Loading…
Cancel
Save