diff --git a/feign-reactor-webclient-core/src/main/java/reactivefeign/webclient/client/WebReactiveHttpClient.java b/feign-reactor-webclient-core/src/main/java/reactivefeign/webclient/client/WebReactiveHttpClient.java
index 555982895..914e63c55 100644
--- a/feign-reactor-webclient-core/src/main/java/reactivefeign/webclient/client/WebReactiveHttpClient.java
+++ b/feign-reactor-webclient-core/src/main/java/reactivefeign/webclient/client/WebReactiveHttpClient.java
@@ -33,6 +33,7 @@
import reactivefeign.client.ReactiveHttpRequest;
import reactivefeign.client.ReactiveHttpResponse;
import reactivefeign.methodhandler.PublisherClientMethodHandler;
+import reactivefeign.utils.SerializedFormData;
import reactor.core.publisher.Mono;
import java.lang.reflect.ParameterizedType;
@@ -43,7 +44,11 @@
import static java.util.Optional.ofNullable;
import static org.springframework.core.ParameterizedTypeReference.forType;
import static reactivefeign.ReactiveContract.isReactorType;
-import static reactivefeign.utils.FeignUtils.*;
+import static reactivefeign.methodhandler.PublisherClientMethodHandler.MultipartMap;
+import static reactivefeign.utils.FeignUtils.getBodyActualType;
+import static reactivefeign.utils.FeignUtils.returnActualType;
+import static reactivefeign.utils.FeignUtils.returnPublisherType;
+
/**
* Uses {@link WebClient} to execute http requests
@@ -127,11 +132,14 @@ protected ReactiveHttpResponse toReactiveHttpResponse(ReactiveHttpRequest req
}
protected BodyInserter, ? super ClientHttpRequest> provideBody(ReactiveHttpRequest request) {
- if(bodyActualType != null){
- return BodyInserters.fromPublisher(request.body(), bodyActualType);
- } else if(request.body() instanceof PublisherClientMethodHandler.MultipartMap){
+ if(request.body() instanceof SerializedFormData){
+ return BodyInserters.fromValue(((SerializedFormData)request.body()).getFormData());
+ } else if(request.body() instanceof MultipartMap){
return BodyInserters.fromMultipartData(new MultiValueMapAdapter<>(
((PublisherClientMethodHandler.MultipartMap) request.body()).getMap()));
+ }
+ else if(bodyActualType != null){
+ return BodyInserters.fromPublisher(request.body(), bodyActualType);
} else {
return BodyInserters.empty();
}
diff --git a/feign-reactor-webclient-core/src/test/java/reactivefeign/webclient/core/ResponseEntityTest.java b/feign-reactor-webclient-core/src/test/java/reactivefeign/webclient/core/ResponseEntityTest.java
index 9252f7f47..ab34c9018 100644
--- a/feign-reactor-webclient-core/src/test/java/reactivefeign/webclient/core/ResponseEntityTest.java
+++ b/feign-reactor-webclient-core/src/test/java/reactivefeign/webclient/core/ResponseEntityTest.java
@@ -19,6 +19,7 @@
import java.util.Map;
import static java.util.Arrays.asList;
+import static org.assertj.core.api.Assertions.assertThat;
abstract public class ResponseEntityTest {
@@ -40,14 +41,15 @@ public void shouldPassResponseAsResponseEntity() {
.target(TestCaller.class, "http://localhost:" + wireMockRule.port());
Mono>> result = client.call();
- StepVerifier.create(result)
- .expectNextMatches(response -> toLowerCaseKeys(response.getHeaders())
- .containsKey("content-type"))
- .verifyComplete();
- StepVerifier.create(result.flatMapMany(HttpEntity::getBody))
+ StepVerifier.create(result
+ .doOnNext(response -> assertThat(toLowerCaseKeys(response.getHeaders())
+ .containsKey("content-type")).isTrue())
+ .flatMapMany(HttpEntity::getBody))
.expectNextSequence(asList(1, 2))
.verifyComplete();
+
+ assertThat(wireMockRule.getAllServeEvents().size()).isEqualTo(1);
}
@Test
@@ -63,12 +65,10 @@ public void shouldPassResponseAsRawResponseEntity() {
Mono>> resultRaw = client.callRaw();
- StepVerifier.create(resultRaw)
- .expectNextMatches(response -> toLowerCaseKeys(response.getHeaders())
- .containsKey("content-type"))
- .verifyComplete();
-
- StepVerifier.create(resultRaw.flatMapMany(HttpEntity::getBody))
+ StepVerifier.create(resultRaw
+ .doOnNext(response -> assertThat(toLowerCaseKeys(response.getHeaders())
+ .containsKey("content-type")).isTrue())
+ .flatMapMany(HttpEntity::getBody))
.expectNextMatches(bytes -> Arrays.equals("[1, 2]".getBytes(), bytes))
.verifyComplete();
}
diff --git a/feign-reactor-webclient-jetty/pom.xml b/feign-reactor-webclient-jetty/pom.xml
index bb9866115..e3601d3d0 100644
--- a/feign-reactor-webclient-jetty/pom.xml
+++ b/feign-reactor-webclient-jetty/pom.xml
@@ -6,7 +6,7 @@
com.playtika.reactivefeign
feign-reactor-parent
../feign-reactor-parent
- 3.2.6
+ 4.0.3
feign-reactor-webclient-jetty
@@ -36,16 +36,21 @@
org.eclipse.jetty.http2
- http2-client
+ jetty-http2-client
true
org.eclipse.jetty.http2
- http2-http-client-transport
+ jetty-http2-client-transport
true
+
+ org.eclipse.jetty
+ jetty-client
+
+
com.playtika.reactivefeign
@@ -92,14 +97,24 @@
test
- com.github.tomakehurst
- wiremock-jre8-standalone
+ org.wiremock
+ wiremock-standalone
test
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-api
+ test
+
+
+ org.apache.logging.log4j
+ log4j-core
+ test
+
+
+ org.apache.logging.log4j
+ log4j-slf4j2-impl
test
diff --git a/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyClientHttpConnectorBuilder.java b/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyClientHttpConnectorBuilder.java
index 3892ca547..797ae8bea 100644
--- a/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyClientHttpConnectorBuilder.java
+++ b/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyClientHttpConnectorBuilder.java
@@ -3,7 +3,7 @@
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpProxy;
import org.eclipse.jetty.http2.client.HTTP2Client;
-import org.eclipse.jetty.http2.client.http.HttpClientTransportOverHTTP2;
+import org.eclipse.jetty.http2.client.transport.HttpClientTransportOverHTTP2;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.http.client.reactive.JettyClientHttpConnector;
import reactivefeign.ReactiveOptions;
@@ -39,8 +39,8 @@ public static ClientHttpConnector buildJettyClientHttpConnector(JettyReactiveOpt
if(options.getProxySettings() != null){
ReactiveOptions.ProxySettings proxySettings = options.getProxySettings();
- httpClient.getProxyConfiguration().getProxies()
- .add(new HttpProxy(proxySettings.getHost(), proxySettings.getPort()));
+ httpClient.getProxyConfiguration()
+ .addProxy(new HttpProxy(proxySettings.getHost(), proxySettings.getPort()));
}
return new JettyClientHttpConnector(httpClient);
diff --git a/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyReactiveOptions.java b/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyReactiveOptions.java
index c28a8952f..8f1667f2c 100644
--- a/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyReactiveOptions.java
+++ b/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyReactiveOptions.java
@@ -39,11 +39,7 @@ public Long getRequestTimeoutMillis() {
return requestTimeoutMillis;
}
- public boolean isEmpty() {
- return super.isEmpty() /*&& requestTimeoutMillis == null*/;
- }
-
- public static class Builder extends ReactiveOptions.Builder{
+ public static class Builder extends ReactiveOptions.Builder{
private Long requestTimeoutMillis;
public Builder() {}
diff --git a/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyWebReactiveFeign.java b/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyWebReactiveFeign.java
index 81ee86d5f..753deba9d 100644
--- a/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyWebReactiveFeign.java
+++ b/feign-reactor-webclient-jetty/src/main/java/reactivefeign/webclient/jetty/JettyWebReactiveFeign.java
@@ -13,7 +13,7 @@
*/
package reactivefeign.webclient.jetty;
-import org.eclipse.jetty.client.api.Request;
+import org.eclipse.jetty.client.Request;
import org.springframework.http.client.reactive.ClientHttpConnector;
import org.springframework.web.reactive.function.client.ClientRequest;
import org.springframework.web.reactive.function.client.WebClient;
diff --git a/feign-reactor-webclient-jetty/src/test/java/reactivefeign/webclient/jetty/allfeatures/WebClientFeaturesTest.java b/feign-reactor-webclient-jetty/src/test/java/reactivefeign/webclient/jetty/allfeatures/WebClientFeaturesTest.java
index f9bec6adf..61f27afe8 100644
--- a/feign-reactor-webclient-jetty/src/test/java/reactivefeign/webclient/jetty/allfeatures/WebClientFeaturesTest.java
+++ b/feign-reactor-webclient-jetty/src/test/java/reactivefeign/webclient/jetty/allfeatures/WebClientFeaturesTest.java
@@ -9,7 +9,7 @@
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.web.server.LocalServerPort;
+import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
diff --git a/feign-reactor-webclient/pom.xml b/feign-reactor-webclient/pom.xml
index ceff5e217..3e0e01155 100644
--- a/feign-reactor-webclient/pom.xml
+++ b/feign-reactor-webclient/pom.xml
@@ -6,7 +6,7 @@
com.playtika.reactivefeign
feign-reactor-parent
../feign-reactor-parent
- 3.2.6
+ 4.0.3
feign-reactor-webclient
@@ -80,14 +80,24 @@
test
- com.github.tomakehurst
- wiremock-jre8-standalone
+ org.wiremock
+ wiremock-standalone
test
org.apache.logging.log4j
- log4j-slf4j-impl
+ log4j-api
+ test
+
+
+ org.apache.logging.log4j
+ log4j-core
+ test
+
+
+ org.apache.logging.log4j
+ log4j-slf4j2-impl
test
diff --git a/feign-reactor-webclient/src/main/java/reactivefeign/webclient/NettyClientHttpConnectorBuilder.java b/feign-reactor-webclient/src/main/java/reactivefeign/webclient/NettyClientHttpConnectorBuilder.java
index 54f8991a2..f2038a69e 100644
--- a/feign-reactor-webclient/src/main/java/reactivefeign/webclient/NettyClientHttpConnectorBuilder.java
+++ b/feign-reactor-webclient/src/main/java/reactivefeign/webclient/NettyClientHttpConnectorBuilder.java
@@ -20,7 +20,9 @@
import java.time.Duration;
import java.util.Objects;
import java.util.concurrent.TimeUnit;
+import java.util.function.Function;
+import static java.lang.Boolean.TRUE;
import static reactor.netty.resources.LoopResources.DEFAULT_NATIVE;
class NettyClientHttpConnectorBuilder {
@@ -33,30 +35,45 @@ private NettyClientHttpConnectorBuilder() {
public static ClientHttpConnector buildNettyClientHttpConnector(HttpClient httpClient, WebReactiveOptions webOptions) {
if (httpClient == null) {
- ConnectionProvider connectionProvider = TcpResources.get();
-
- Integer maxConnections = webOptions.getMaxConnections();
- Integer pendingAcquireMaxCount = webOptions.getPendingAcquireMaxCount();
- Long pendingAcquireTimeoutMillis = webOptions.getPendingAcquireTimeoutMillis();
- if (maxConnections != null || pendingAcquireMaxCount != null || pendingAcquireTimeoutMillis != null) {
- ConnectionProvider.Builder connectionProviderBuilder = connectionProvider.mutate();
- if (maxConnections != null) {
- connectionProviderBuilder = connectionProviderBuilder.maxConnections(maxConnections);
- }
- if (pendingAcquireMaxCount != null) {
- connectionProviderBuilder = connectionProviderBuilder.pendingAcquireMaxCount(pendingAcquireMaxCount);
- }
- if (pendingAcquireTimeoutMillis != null) {
- Duration pendingAcquireTimeout = Duration.ofMillis(pendingAcquireTimeoutMillis);
- connectionProviderBuilder = connectionProviderBuilder.pendingAcquireTimeout(pendingAcquireTimeout);
- }
- connectionProvider = connectionProviderBuilder.build();
+
+ ConnectionProvider connectionProvider = webOptions.getConnectionProvider();
+ if(connectionProvider == null){
+ connectionProvider = TcpResources.get();
}
+ ConnectionProvider.Builder connectionProviderBuilder = connectionProvider.mutate();
+ if(webOptions.getConnectionMetricsEnabled() != null){
+ connectionProviderBuilder = connectionProviderBuilder.metrics(webOptions.getConnectionMetricsEnabled());
+ }
+ if (webOptions.getMaxConnections() != null) {
+ connectionProviderBuilder = connectionProviderBuilder.maxConnections(webOptions.getMaxConnections());
+ }
+ if(webOptions.getConnectionMaxIdleTimeMillis() != null){
+ connectionProviderBuilder = connectionProviderBuilder.maxIdleTime(
+ Duration.ofMillis(webOptions.getConnectionMaxIdleTimeMillis()));
+ }
+ if(webOptions.getConnectionMaxLifeTimeMillis() != null){
+ connectionProviderBuilder = connectionProviderBuilder.maxLifeTime(
+ Duration.ofMillis(webOptions.getConnectionMaxLifeTimeMillis()));
+ }
+ if (webOptions.getPendingAcquireMaxCount() != null) {
+ connectionProviderBuilder = connectionProviderBuilder.pendingAcquireMaxCount(webOptions.getPendingAcquireMaxCount());
+ }
+ if (webOptions.getPendingAcquireTimeoutMillis() != null) {
+ connectionProviderBuilder = connectionProviderBuilder.pendingAcquireTimeout(
+ Duration.ofMillis(webOptions.getPendingAcquireTimeoutMillis()));
+ }
+
+ connectionProvider = connectionProviderBuilder.build();
+
httpClient = HttpClient.create(connectionProvider)
.runOn(HttpResources.get(), DEFAULT_NATIVE);
}
+ if(webOptions.getMetricsEnabled() != null){
+ httpClient = httpClient.metrics(webOptions.getMetricsEnabled(), Function.identity());
+ }
+
if (webOptions.getConnectTimeoutMillis() != null) {
httpClient = httpClient.option(ChannelOption.CONNECT_TIMEOUT_MILLIS,
webOptions.getConnectTimeoutMillis().intValue());
@@ -99,7 +116,10 @@ public static ClientHttpConnector buildNettyClientHttpConnector(HttpClient httpC
httpClient = httpClient.followRedirect(webOptions.isFollowRedirects());
}
- if (Objects.equals(Boolean.TRUE, webOptions.isDisableSslValidation())) {
+ if(webOptions.getSslContext() != null){
+ httpClient = httpClient.secure(sslProviderBuilder -> sslProviderBuilder.sslContext(webOptions.getSslContext()));
+ }
+ else if (Objects.equals(TRUE, webOptions.isDisableSslValidation())) {
try {
SslContext sslContext = SslContextBuilder.forClient()
.trustManager(InsecureTrustManagerFactory.INSTANCE)
diff --git a/feign-reactor-webclient/src/main/java/reactivefeign/webclient/WebReactiveOptions.java b/feign-reactor-webclient/src/main/java/reactivefeign/webclient/WebReactiveOptions.java
index c4b5d0424..e329400f9 100644
--- a/feign-reactor-webclient/src/main/java/reactivefeign/webclient/WebReactiveOptions.java
+++ b/feign-reactor-webclient/src/main/java/reactivefeign/webclient/WebReactiveOptions.java
@@ -13,7 +13,9 @@
*/
package reactivefeign.webclient;
+import io.netty.handler.ssl.SslContext;
import reactivefeign.ReactiveOptions;
+import reactor.netty.resources.ConnectionProvider;
/**
* @author Sergii Karpenko
@@ -30,23 +32,41 @@ public class WebReactiveOptions extends ReactiveOptions {
private final Long readTimeoutMillis;
private final Long writeTimeoutMillis;
private final Long responseTimeoutMillis;
+ private final SslContext sslContext;
private final Boolean disableSslValidation;
+ private final Boolean metricsEnabled;
+
+ private final ConnectionProvider connectionProvider;
private final Integer maxConnections;
+ private final Boolean connectionMetricsEnabled;
+ private final Long connectionMaxIdleTimeMillis;
+ private final Long connectionMaxLifeTimeMillis;
private final Integer pendingAcquireMaxCount;
private final Long pendingAcquireTimeoutMillis;
private WebReactiveOptions(Boolean useHttp2, Long connectTimeoutMillis,
Long readTimeoutMillis, Long writeTimeoutMillis, Long responseTimeoutMillis,
Boolean tryUseCompression, Boolean followRedirects,
- ProxySettings proxySettings, Boolean disableSslValidation,
- Integer maxConnections, Integer pendingAcquireMaxCount, Long pendingAcquireTimeoutMillis) {
+ ProxySettings proxySettings,
+ SslContext sslContext, Boolean disableSslValidation,
+ Boolean metricsEnabled,
+ ConnectionProvider connectionProvider,
+ Integer maxConnections, Boolean connectionMetricsEnabled,
+ Long connectionMaxIdleTimeMillis, Long connectionMaxLifeTimeMillis,
+ Integer pendingAcquireMaxCount, Long pendingAcquireTimeoutMillis) {
super(useHttp2, connectTimeoutMillis, tryUseCompression, followRedirects, proxySettings);
this.readTimeoutMillis = readTimeoutMillis;
this.writeTimeoutMillis = writeTimeoutMillis;
this.responseTimeoutMillis = responseTimeoutMillis;
+ this.sslContext = sslContext;
this.disableSslValidation = disableSslValidation;
+ this.metricsEnabled = metricsEnabled;
+ this.connectionProvider = connectionProvider;
this.maxConnections = maxConnections;
+ this.connectionMetricsEnabled = connectionMetricsEnabled;
+ this.connectionMaxIdleTimeMillis = connectionMaxIdleTimeMillis;
+ this.connectionMaxLifeTimeMillis = connectionMaxLifeTimeMillis;
this.pendingAcquireMaxCount = pendingAcquireMaxCount;
this.pendingAcquireTimeoutMillis = pendingAcquireTimeoutMillis;
}
@@ -63,18 +83,38 @@ public Long getResponseTimeoutMillis() {
return responseTimeoutMillis;
}
- public boolean isEmpty() {
- return super.isEmpty() && readTimeoutMillis == null && writeTimeoutMillis == null;
- }
-
public Boolean isDisableSslValidation() {
return disableSslValidation;
}
+ public SslContext getSslContext() {
+ return sslContext;
+ }
+
+ public Boolean getMetricsEnabled() {
+ return metricsEnabled;
+ }
+
+ public ConnectionProvider getConnectionProvider() {
+ return connectionProvider;
+ }
+
public Integer getMaxConnections() {
return maxConnections;
}
+ public Boolean getConnectionMetricsEnabled() {
+ return connectionMetricsEnabled;
+ }
+
+ public Long getConnectionMaxIdleTimeMillis() {
+ return connectionMaxIdleTimeMillis;
+ }
+
+ public Long getConnectionMaxLifeTimeMillis() {
+ return connectionMaxLifeTimeMillis;
+ }
+
public Integer getPendingAcquireMaxCount() {
return pendingAcquireMaxCount;
}
@@ -83,12 +123,18 @@ public Long getPendingAcquireTimeoutMillis() {
return pendingAcquireTimeoutMillis;
}
- public static class Builder extends ReactiveOptions.Builder {
+ public static class Builder extends ReactiveOptions.Builder {
private Long readTimeoutMillis;
private Long writeTimeoutMillis;
private Long responseTimeoutMillis;
private Boolean disableSslValidation;
+ private SslContext sslContext;
+ private Boolean metricsEnabled;
+ private ConnectionProvider connectionProvider;
private Integer maxConnections;
+ private Boolean connectionMetricsEnabled;
+ private Long connectionMaxIdleTimeMillis;
+ private Long connectionMaxLifeTimeMillis;
private Integer pendingAcquireMaxCount;
private Long pendingAcquireTimeoutMillis;
@@ -114,11 +160,41 @@ public Builder setDisableSslValidation(boolean disableSslValidation) {
return this;
}
+ public Builder setSslContext(SslContext sslContext) {
+ this.sslContext = sslContext;
+ return this;
+ }
+
+ public Builder setMetricsEnabled(Boolean metricsEnabled) {
+ this.metricsEnabled = metricsEnabled;
+ return this;
+ }
+
+ public Builder setConnectionProvider(ConnectionProvider connectionProvider) {
+ this.connectionProvider = connectionProvider;
+ return this;
+ }
+
+ public Builder setConnectionMetricsEnabled(Boolean connectionMetricsEnabled) {
+ this.connectionMetricsEnabled = connectionMetricsEnabled;
+ return this;
+ }
+
public Builder setMaxConnections(Integer maxConnections) {
this.maxConnections = maxConnections;
return this;
}
+ public Builder setConnectionMaxIdleTimeMillis(Long connectionMaxIdleTimeMillis) {
+ this.connectionMaxIdleTimeMillis = connectionMaxIdleTimeMillis;
+ return this;
+ }
+
+ public Builder setConnectionMaxLifeTimeMillis(Long connectionMaxLifeTimeMillis) {
+ this.connectionMaxLifeTimeMillis = connectionMaxLifeTimeMillis;
+ return this;
+ }
+
public Builder setPendingAcquireMaxCount(Integer pendingAcquireMaxCount) {
this.pendingAcquireMaxCount = pendingAcquireMaxCount;
return this;
@@ -132,8 +208,13 @@ public Builder setPendingAcquireTimeoutMillis(Long pendingAcquireTimeoutMillis)
public WebReactiveOptions build() {
return new WebReactiveOptions(useHttp2, connectTimeoutMillis,
readTimeoutMillis, writeTimeoutMillis, responseTimeoutMillis,
- acceptCompressed, followRedirects, proxySettings, disableSslValidation,
- maxConnections, pendingAcquireMaxCount, pendingAcquireTimeoutMillis);
+ acceptCompressed, followRedirects, proxySettings,
+ sslContext, disableSslValidation,
+ metricsEnabled,
+ connectionProvider,
+ maxConnections, connectionMetricsEnabled,
+ connectionMaxIdleTimeMillis, connectionMaxLifeTimeMillis,
+ pendingAcquireMaxCount, pendingAcquireTimeoutMillis);
}
}
@@ -171,17 +252,17 @@ public static class WebProxySettingsBuilder extends ProxySettingsBuilder {
private Long timeout;
- public ReactiveOptions.ProxySettingsBuilder username(String username) {
+ public WebProxySettingsBuilder username(String username) {
this.username = username;
return this;
}
- public ReactiveOptions.ProxySettingsBuilder password(String password) {
+ public WebProxySettingsBuilder password(String password) {
this.password = password;
return this;
}
- public ReactiveOptions.ProxySettingsBuilder timeout(Long timeout) {
+ public WebProxySettingsBuilder timeout(Long timeout) {
this.timeout = timeout;
return this;
}
diff --git a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/BasicFeaturesTest.java b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/BasicFeaturesTest.java
index 31259827c..d9208a763 100644
--- a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/BasicFeaturesTest.java
+++ b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/BasicFeaturesTest.java
@@ -13,6 +13,7 @@
*/
package reactivefeign.webclient;
+import com.fasterxml.jackson.core.io.JsonEOFException;
import feign.FeignException;
import org.junit.Test;
import org.springframework.core.codec.DecodingException;
@@ -38,7 +39,8 @@ protected ReactiveFeign.Builder builder() {
@Override
protected Predicate corruptedJsonError() {
- return throwable -> throwable instanceof DecodingException;
+ return throwable -> throwable instanceof DecodingException
+ && throwable.getCause() instanceof JsonEOFException;
}
@Test
diff --git a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/SslVerificationTest.java b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/SslVerificationTest.java
index 9b855d163..c1d5efe50 100644
--- a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/SslVerificationTest.java
+++ b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/SslVerificationTest.java
@@ -17,6 +17,8 @@
import com.fasterxml.jackson.core.JsonProcessingException;
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
import com.github.tomakehurst.wiremock.junit.WireMockClassRule;
+import io.netty.handler.ssl.SslContextBuilder;
+import io.netty.handler.ssl.util.InsecureTrustManagerFactory;
import org.junit.Rule;
import org.junit.Test;
import reactivefeign.ReactiveFeign;
@@ -28,6 +30,8 @@
import reactor.core.publisher.Mono;
import reactor.test.StepVerifier;
+import javax.net.ssl.SSLException;
+
import static com.github.tomakehurst.wiremock.client.WireMock.aResponse;
import static com.github.tomakehurst.wiremock.client.WireMock.equalTo;
import static com.github.tomakehurst.wiremock.client.WireMock.post;
@@ -56,11 +60,10 @@ private IcecreamServiceApi client(boolean disableSslValidation) {
private ReactiveFeign.Builder builder(boolean disableSslValidation) {
- return (ReactiveFeign.Builder) WebReactiveFeign.builder()
+ return WebReactiveFeign.builder()
.options(new WebReactiveOptions.Builder()
.setDisableSslValidation(disableSslValidation)
- .build()
- );
+ .build());
}
@@ -84,6 +87,32 @@ public void givenDisabledSslValidation_shouldPass() throws JsonProcessingExcepti
.verifyComplete();
}
+ @Test
+ public void givenDisabledSslValidationContext_shouldPass() throws JsonProcessingException, SSLException {
+
+ IceCreamOrder order = new OrderGenerator().generate(20);
+ Bill billExpected = Bill.makeBill(order);
+
+ wireMockRule.stubFor(post(urlEqualTo("/icecream/orders"))
+ .withRequestBody(equalTo(TestUtils.MAPPER.writeValueAsString(order)))
+ .willReturn(aResponse().withStatus(200)
+ .withHeader("Content-Type", "application/json")
+ .withBody(TestUtils.MAPPER.writeValueAsString(billExpected))));
+
+ IcecreamServiceApi client = WebReactiveFeign.builder()
+ .options(new WebReactiveOptions.Builder()
+ .setSslContext(SslContextBuilder.forClient()
+ .trustManager(InsecureTrustManagerFactory.INSTANCE)
+ .build())
+ .build())
+ .target(IcecreamServiceApi.class, "https://localhost:" + wireMockRule.httpsPort());
+ Mono bill = client.makeOrder(order);
+
+ StepVerifier.create(bill.subscribeOn(testScheduler()))
+ .expectNextMatches(equalsComparingFieldByFieldRecursively(billExpected))
+ .verifyComplete();
+ }
+
@Test
public void givenEnabledSslValidation_shouldFail() throws JsonProcessingException {
diff --git a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesApi.java b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesApi.java
index 7493f90ea..edae741d5 100644
--- a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesApi.java
+++ b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesApi.java
@@ -5,17 +5,25 @@
import org.reactivestreams.Publisher;
import org.springframework.core.io.Resource;
import org.springframework.core.io.buffer.DataBuffer;
+import org.springframework.util.MultiValueMap;
+import reactivefeign.allfeatures.AllFeaturesApi;
import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
+import static org.springframework.http.MediaType.APPLICATION_FORM_URLENCODED_VALUE;
import static org.springframework.http.MediaType.APPLICATION_OCTET_STREAM_VALUE;
public interface WebClientFeaturesApi {
- @RequestLine("POST " + "/mirrorStreamingBinaryBodyReactive")
@Headers({ "Content-Type: "+APPLICATION_OCTET_STREAM_VALUE })
+ @RequestLine("POST " + "/mirrorStreamingBinaryBodyReactive")
Flux mirrorStreamingBinaryBodyReactive(Publisher body);
- @RequestLine("POST " + "/mirrorResourceReactiveWithZeroCopying")
@Headers({ "Content-Type: "+APPLICATION_OCTET_STREAM_VALUE })
+ @RequestLine("POST " + "/mirrorResourceReactiveWithZeroCopying")
Flux mirrorResourceReactiveWithZeroCopying(Resource resource);
+
+ @Headers({ "Content-Type: "+APPLICATION_FORM_URLENCODED_VALUE })
+ @RequestLine("POST /passUrlEncodedForm")
+ Mono passUrlEncodedForm(MultiValueMap form);
}
diff --git a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesController.java b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesController.java
index aff36b5aa..bbfc56481 100644
--- a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesController.java
+++ b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesController.java
@@ -5,23 +5,32 @@
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
+import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.server.ServerWebExchange;
+import reactivefeign.allfeatures.AllFeaturesApi;
import reactor.core.publisher.Flux;
+import reactor.core.publisher.Mono;
@RestController
-public class WebClientFeaturesController implements WebClientFeaturesApi{
+public class WebClientFeaturesController {
@PostMapping(path = "/mirrorStreamingBinaryBodyReactive")
- @Override
public Flux mirrorStreamingBinaryBodyReactive(@RequestBody Publisher body) {
return Flux.from(body);
}
@PostMapping(path = "/mirrorResourceReactiveWithZeroCopying")
- @Override
public Flux mirrorResourceReactiveWithZeroCopying(@RequestBody Resource resource) {
return DataBufferUtils.read(resource, new DefaultDataBufferFactory(), 3);
}
+
+ @PostMapping(path = "/passUrlEncodedForm",
+ consumes = {MediaType.APPLICATION_FORM_URLENCODED_VALUE})
+ public Mono passUrlEncodedForm(ServerWebExchange serverWebExchange){
+ return serverWebExchange.getFormData()
+ .map(formData -> new AllFeaturesApi.TestObject(formData.toString()));
+ }
}
diff --git a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesTest.java b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesTest.java
index 89e55f9da..cdb877023 100644
--- a/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesTest.java
+++ b/feign-reactor-webclient/src/test/java/reactivefeign/webclient/allfeatures/WebClientFeaturesTest.java
@@ -9,17 +9,23 @@
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.security.reactive.ReactiveUserDetailsServiceAutoConfiguration;
import org.springframework.boot.test.context.SpringBootTest;
-import org.springframework.boot.web.server.LocalServerPort;
+import org.springframework.boot.test.web.server.LocalServerPort;
import org.springframework.core.io.ByteArrayResource;
import org.springframework.core.io.buffer.DataBuffer;
import org.springframework.core.io.buffer.DataBufferUtils;
import org.springframework.core.io.buffer.DefaultDataBufferFactory;
import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.util.MultiValueMapAdapter;
import reactivefeign.webclient.WebReactiveFeign;
import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
import static java.nio.ByteBuffer.wrap;
+import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
@RunWith(SpringRunner.class)
@@ -35,9 +41,6 @@ public class WebClientFeaturesTest {
@LocalServerPort
private int port;
- @Rule
- public ExpectedException expectedException = ExpectedException.none();
-
@Before
public void setUp() {
client = WebReactiveFeign.builder()
@@ -71,5 +74,16 @@ public void shouldMirrorResourceReactiveWithZeroCopying(){
assertThat(DataBufferUtils.join(returned).block().asByteBuffer()).isEqualTo(wrap(data));
}
+ @Test
+ public void shouldPassUrlEncodedForm() {
+ Map> form = new HashMap<>();
+ form.put("key1", singletonList("value1"));
+ form.put("key2", singletonList("value2"));
+
+ StepVerifier.create(client.passUrlEncodedForm(new MultiValueMapAdapter<>(form)))
+ .expectNextMatches(result -> result.payload.equals("{key1=[value1], key2=[value2]}"))
+ .verifyComplete();
+ }
+
}
diff --git a/mvnw b/mvnw
new file mode 100755
index 000000000..5643201c7
--- /dev/null
+++ b/mvnw
@@ -0,0 +1,316 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+# JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+# M2_HOME - location of maven2's installed home dir
+# MAVEN_OPTS - parameters passed to the Java VM when running Maven
+# e.g. to debug Maven itself, use
+# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+# ----------------------------------------------------------------------------
+
+if [ -z "$MAVEN_SKIP_RC" ] ; then
+
+ if [ -f /usr/local/etc/mavenrc ] ; then
+ . /usr/local/etc/mavenrc
+ fi
+
+ if [ -f /etc/mavenrc ] ; then
+ . /etc/mavenrc
+ fi
+
+ if [ -f "$HOME/.mavenrc" ] ; then
+ . "$HOME/.mavenrc"
+ fi
+
+fi
+
+# OS specific support. $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+ CYGWIN*) cygwin=true ;;
+ MINGW*) mingw=true;;
+ Darwin*) darwin=true
+ # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
+ # See https://developer.apple.com/library/mac/qa/qa1170/_index.html
+ if [ -z "$JAVA_HOME" ]; then
+ if [ -x "/usr/libexec/java_home" ]; then
+ export JAVA_HOME="`/usr/libexec/java_home`"
+ else
+ export JAVA_HOME="/Library/Java/Home"
+ fi
+ fi
+ ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+ if [ -r /etc/gentoo-release ] ; then
+ JAVA_HOME=`java-config --jre-home`
+ fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+ ## resolve links - $0 may be a link to maven's home
+ PRG="$0"
+
+ # need this for relative symlinks
+ while [ -h "$PRG" ] ; do
+ ls=`ls -ld "$PRG"`
+ link=`expr "$ls" : '.*-> \(.*\)$'`
+ if expr "$link" : '/.*' > /dev/null; then
+ PRG="$link"
+ else
+ PRG="`dirname "$PRG"`/$link"
+ fi
+ done
+
+ saveddir=`pwd`
+
+ M2_HOME=`dirname "$PRG"`/..
+
+ # make it fully qualified
+ M2_HOME=`cd "$M2_HOME" && pwd`
+
+ cd "$saveddir"
+ # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --unix "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Mingw, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+fi
+
+if [ -z "$JAVA_HOME" ]; then
+ javaExecutable="`which javac`"
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
+ # readlink(1) is not available as standard on Solaris 10.
+ readLink=`which readlink`
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
+ if $darwin ; then
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
+ else
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
+ fi
+ javaHome="`dirname \"$javaExecutable\"`"
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
+ JAVA_HOME="$javaHome"
+ export JAVA_HOME
+ fi
+ fi
+fi
+
+if [ -z "$JAVACMD" ] ; then
+ if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD="$JAVA_HOME/jre/sh/java"
+ else
+ JAVACMD="$JAVA_HOME/bin/java"
+ fi
+ else
+ JAVACMD="`\\unset -f command; \\command -v java`"
+ fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+ echo "Error: JAVA_HOME is not defined correctly." >&2
+ echo " We cannot execute $JAVACMD" >&2
+ exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+ echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# traverses directory structure from process work directory to filesystem root
+# first directory with .mvn subdirectory is considered project base directory
+find_maven_basedir() {
+
+ if [ -z "$1" ]
+ then
+ echo "Path not specified to find_maven_basedir"
+ return 1
+ fi
+
+ basedir="$1"
+ wdir="$1"
+ while [ "$wdir" != '/' ] ; do
+ if [ -d "$wdir"/.mvn ] ; then
+ basedir=$wdir
+ break
+ fi
+ # workaround for JBEAP-8937 (on Solaris 10/Sparc)
+ if [ -d "${wdir}" ]; then
+ wdir=`cd "$wdir/.."; pwd`
+ fi
+ # end of workaround
+ done
+ echo "${basedir}"
+}
+
+# concatenates all lines of a file
+concat_lines() {
+ if [ -f "$1" ]; then
+ echo "$(tr -s '\n' ' ' < "$1")"
+ fi
+}
+
+BASE_DIR=`find_maven_basedir "$(pwd)"`
+if [ -z "$BASE_DIR" ]; then
+ exit 1;
+fi
+
+##########################################################################################
+# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+# This allows using the maven wrapper in projects that prohibit checking in binary data.
+##########################################################################################
+if [ -r "$BASE_DIR/.mvn/wrapper/maven-wrapper.jar" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found .mvn/wrapper/maven-wrapper.jar"
+ fi
+else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Couldn't find .mvn/wrapper/maven-wrapper.jar, downloading it ..."
+ fi
+ if [ -n "$MVNW_REPOURL" ]; then
+ jarUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+ else
+ jarUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+ fi
+ while IFS="=" read key value; do
+ case "$key" in (wrapperUrl) jarUrl="$value"; break ;;
+ esac
+ done < "$BASE_DIR/.mvn/wrapper/maven-wrapper.properties"
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Downloading from: $jarUrl"
+ fi
+ wrapperJarPath="$BASE_DIR/.mvn/wrapper/maven-wrapper.jar"
+ if $cygwin; then
+ wrapperJarPath=`cygpath --path --windows "$wrapperJarPath"`
+ fi
+
+ if command -v wget > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found wget ... using wget"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ wget "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ else
+ wget --http-user=$MVNW_USERNAME --http-password=$MVNW_PASSWORD "$jarUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
+ fi
+ elif command -v curl > /dev/null; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Found curl ... using curl"
+ fi
+ if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
+ curl -o "$wrapperJarPath" "$jarUrl" -f
+ else
+ curl --user $MVNW_USERNAME:$MVNW_PASSWORD -o "$wrapperJarPath" "$jarUrl" -f
+ fi
+
+ else
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo "Falling back to using Java to download"
+ fi
+ javaClass="$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.java"
+ # For Cygwin, switch paths to Windows format before running javac
+ if $cygwin; then
+ javaClass=`cygpath --path --windows "$javaClass"`
+ fi
+ if [ -e "$javaClass" ]; then
+ if [ ! -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Compiling MavenWrapperDownloader.java ..."
+ fi
+ # Compiling the Java class
+ ("$JAVA_HOME/bin/javac" "$javaClass")
+ fi
+ if [ -e "$BASE_DIR/.mvn/wrapper/MavenWrapperDownloader.class" ]; then
+ # Running the downloader
+ if [ "$MVNW_VERBOSE" = true ]; then
+ echo " - Running MavenWrapperDownloader.java ..."
+ fi
+ ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$MAVEN_PROJECTBASEDIR")
+ fi
+ fi
+ fi
+fi
+##########################################################################################
+# End of extension
+##########################################################################################
+
+export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
+if [ "$MVNW_VERBOSE" = true ]; then
+ echo $MAVEN_PROJECTBASEDIR
+fi
+MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+ [ -n "$M2_HOME" ] &&
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
+ [ -n "$JAVA_HOME" ] &&
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+ [ -n "$CLASSPATH" ] &&
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
+ [ -n "$MAVEN_PROJECTBASEDIR" ] &&
+ MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
+fi
+
+# Provide a "standardized" way to retrieve the CLI args that will
+# work with both Windows and non-Windows executions.
+MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
+export MAVEN_CMD_LINE_ARGS
+
+WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+exec "$JAVACMD" \
+ $MAVEN_OPTS \
+ $MAVEN_DEBUG_OPTS \
+ -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
+ "-Dmaven.home=${M2_HOME}" \
+ "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
+ ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"
diff --git a/mvnw.cmd b/mvnw.cmd
new file mode 100644
index 000000000..8a15b7f31
--- /dev/null
+++ b/mvnw.cmd
@@ -0,0 +1,188 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements. See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership. The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License. You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied. See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM set title of command window
+title %0
+@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
+@REM check for pre script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %*
+if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %*
+:skipRcPre
+
+@setlocal
+
+set ERROR_CODE=0
+
+@REM To isolate internal variables from possible post scripts, we use another setlocal
+@setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo Error: JAVA_HOME not found in your environment. >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto init
+
+echo.
+echo Error: JAVA_HOME is set to an invalid directory. >&2
+echo JAVA_HOME = "%JAVA_HOME%" >&2
+echo Please set the JAVA_HOME variable in your environment to match the >&2
+echo location of your Java installation. >&2
+echo.
+goto error
+
+@REM ==== END VALIDATION ====
+
+:init
+
+@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
+@REM Fallback to current working directory if not found.
+
+set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
+IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
+
+set EXEC_DIR=%CD%
+set WDIR=%EXEC_DIR%
+:findBaseDir
+IF EXIST "%WDIR%"\.mvn goto baseDirFound
+cd ..
+IF "%WDIR%"=="%CD%" goto baseDirNotFound
+set WDIR=%CD%
+goto findBaseDir
+
+:baseDirFound
+set MAVEN_PROJECTBASEDIR=%WDIR%
+cd "%EXEC_DIR%"
+goto endDetectBaseDir
+
+:baseDirNotFound
+set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
+cd "%EXEC_DIR%"
+
+:endDetectBaseDir
+
+IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
+
+@setlocal EnableExtensions EnableDelayedExpansion
+for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
+@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
+
+:endReadAdditionalConfig
+
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
+set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
+
+set DOWNLOAD_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+
+FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO (
+ IF "%%A"=="wrapperUrl" SET DOWNLOAD_URL=%%B
+)
+
+@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
+@REM This allows using the maven wrapper in projects that prohibit checking in binary data.
+if exist %WRAPPER_JAR% (
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Found %WRAPPER_JAR%
+ )
+) else (
+ if not "%MVNW_REPOURL%" == "" (
+ SET DOWNLOAD_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.1.0/maven-wrapper-3.1.0.jar"
+ )
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Couldn't find %WRAPPER_JAR%, downloading it ...
+ echo Downloading from: %DOWNLOAD_URL%
+ )
+
+ powershell -Command "&{"^
+ "$webclient = new-object System.Net.WebClient;"^
+ "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^
+ "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^
+ "}"^
+ "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%DOWNLOAD_URL%', '%WRAPPER_JAR%')"^
+ "}"
+ if "%MVNW_VERBOSE%" == "true" (
+ echo Finished downloading %WRAPPER_JAR%
+ )
+)
+@REM End of extension
+
+@REM Provide a "standardized" way to retrieve the CLI args that will
+@REM work with both Windows and non-Windows executions.
+set MAVEN_CMD_LINE_ARGS=%*
+
+%MAVEN_JAVA_EXE% ^
+ %JVM_CONFIG_MAVEN_PROPS% ^
+ %MAVEN_OPTS% ^
+ %MAVEN_DEBUG_OPTS% ^
+ -classpath %WRAPPER_JAR% ^
+ "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^
+ %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+set ERROR_CODE=1
+
+:end
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost
+@REM check for post script, once with legacy .bat ending and once with .cmd ending
+if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat"
+if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd"
+:skipRcPost
+
+@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%"=="on" pause
+
+if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%
diff --git a/pom.xml b/pom.xml
index 4c5c608d5..96fbe1198 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,7 +5,7 @@
com.playtika.reactivefeign
feign-reactor
- 3.2.6
+ 4.0.3
pom
@@ -13,6 +13,7 @@
feign-reactor-webclient-core
feign-reactor-webclient
feign-reactor-webclient-jetty
+ feign-reactor-webclient-apache-client5
feign-reactor-cloud
feign-reactor-rx2
feign-reactor-jetty
@@ -27,34 +28,26 @@
feign-reactive
Use Feign client on WebClient
- https://github.com/Playtika/feign-reactive
+ https://github.com/PlaytikaOSS/feign-reactive
The Apache Software License, Version 2.0
- http://www.apache.org/licenses/LICENSE-2.0.txt
+ https://www.apache.org/licenses/LICENSE-2.0.txt
repo
- https://svn.apache.org/viewvc/maven
- scm:git:git://github.com/Playtika/feign-reactive.git
- scm:git:git@github.com:Playtika/feign-reactive.git
+ https://github.com/PlaytikaOSS/feign-reactive
+ scm:git:git://github.com/PlaytikaOSS/feign-reactive.git
+ scm:git:git@github.com:PlaytikaOSS/feign-reactive.git
HEAD
- 1.6.12
- 3.0.1
- 2.5.3
- 2.3
-
-
- 3EEF24C7
- false
- true
- never
+ 1.6.13
+ 3.1.0
@@ -65,20 +58,16 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+ ossrh
+ https://oss.sonatype.org/content/repositories/snapshots
+
+
+ ossrh
+ https://oss.sonatype.org/service/local/staging/deploy/maven2/
+
+