diff --git a/commons-core/pom.xml b/commons-core/pom.xml
index efb2973..e4a36d1 100644
--- a/commons-core/pom.xml
+++ b/commons-core/pom.xml
@@ -7,11 +7,11 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
commons-core
- 1.1.9
+ 1.1.10
diff --git a/commons-coroutines/pom.xml b/commons-coroutines/pom.xml
index f1e522d..93243e7 100644
--- a/commons-coroutines/pom.xml
+++ b/commons-coroutines/pom.xml
@@ -7,17 +7,17 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
commons-coroutines
- 1.1.9
+ 1.1.10
ru.sokomishalov.commons
commons-core
- 1.1.9
+ 1.1.10
diff --git a/commons-coroutines/src/main/kotlin/ru/sokomishalov/commons/core/reactor/ReactorUtils.kt b/commons-coroutines/src/main/kotlin/ru/sokomishalov/commons/core/reactor/ReactorUtils.kt
index ad31c67..e535c49 100644
--- a/commons-coroutines/src/main/kotlin/ru/sokomishalov/commons/core/reactor/ReactorUtils.kt
+++ b/commons-coroutines/src/main/kotlin/ru/sokomishalov/commons/core/reactor/ReactorUtils.kt
@@ -32,7 +32,7 @@ import kotlin.coroutines.EmptyCoroutineContext
fun aFlux(
context: CoroutineContext = EmptyCoroutineContext,
- block: suspend () -> Iterable
+ block: suspend CoroutineScope.() -> Iterable
): Flux {
return flux(context) { block().forEach { send(it) } }
}
diff --git a/commons-logging/pom.xml b/commons-logging/pom.xml
index d51fb21..581760a 100644
--- a/commons-logging/pom.xml
+++ b/commons-logging/pom.xml
@@ -7,17 +7,17 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
commons-logging
- 1.1.9
+ 1.1.10
ru.sokomishalov.commons
commons-core
- 1.1.9
+ 1.1.10
diff --git a/commons-reactor/pom.xml b/commons-reactor/pom.xml
index 060c90c..e201c90 100644
--- a/commons-reactor/pom.xml
+++ b/commons-reactor/pom.xml
@@ -7,17 +7,17 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
commons-reactor
- 1.1.9
+ 1.1.10
ru.sokomishalov.commons
commons-core
- 1.1.9
+ 1.1.10
diff --git a/commons-serialization/pom.xml b/commons-serialization/pom.xml
index 1edfd17..d0720d7 100644
--- a/commons-serialization/pom.xml
+++ b/commons-serialization/pom.xml
@@ -7,11 +7,11 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
commons-serialization
- 1.1.9
+ 1.1.10
@@ -19,7 +19,7 @@
ru.sokomishalov.commons
commons-core
- 1.1.9
+ 1.1.10
diff --git a/commons-spring/pom.xml b/commons-spring/pom.xml
index 3d2797b..bffa110 100644
--- a/commons-spring/pom.xml
+++ b/commons-spring/pom.xml
@@ -7,11 +7,11 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
commons-spring
- 1.1.9
+ 1.1.10
@@ -20,19 +20,19 @@
ru.sokomishalov.commons
commons-core
- 1.1.9
+ 1.1.10
ru.sokomishalov.commons
commons-logging
- 1.1.9
+ 1.1.10
ru.sokomishalov.commons
commons-serialization
- 1.1.9
+ 1.1.10
@@ -58,14 +58,14 @@
ru.sokomishalov.commons
commons-reactor
- 1.1.9
+ 1.1.10
true
ru.sokomishalov.commons
commons-coroutines
- 1.1.9
+ 1.1.10
true
diff --git a/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/webclient/ReactiveWebClientUtils.kt b/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/webclient/ReactiveWebClientUtils.kt
index a35c813..d16de00 100644
--- a/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/webclient/ReactiveWebClientUtils.kt
+++ b/commons-spring/src/main/kotlin/ru/sokomishalov/commons/spring/webclient/ReactiveWebClientUtils.kt
@@ -17,7 +17,9 @@
package ru.sokomishalov.commons.spring.webclient
+import org.springframework.http.client.reactive.ClientHttpConnector
import org.springframework.http.client.reactive.ReactorClientHttpConnector
+import org.springframework.http.codec.CodecConfigurer
import org.springframework.http.codec.json.Jackson2JsonDecoder
import org.springframework.http.codec.json.Jackson2JsonEncoder
import org.springframework.web.reactive.function.client.ExchangeFilterFunction
@@ -39,9 +41,15 @@ fun createReactiveWebClient(
baseUrl: String? = null,
fixedThreadPoolSize: Int? = null,
reactorNettyClient: HttpClient = createReactorNettyClient(baseUrl = baseUrl, fixedThreadPoolSize = fixedThreadPoolSize),
+ clientConnector: ClientHttpConnector = ReactorClientHttpConnector(reactorNettyClient),
encoder: Jackson2JsonEncoder = JACKSON_ENCODER,
decoder: Jackson2JsonDecoder = JACKSON_DECODER,
maxBufferSize: Int? = null,
+ codecs: CodecConfigurer.DefaultCodecs.() -> Unit = {
+ jackson2JsonEncoder(encoder)
+ jackson2JsonDecoder(decoder)
+ maxBufferSize?.let { maxInMemorySize(it) }
+ },
filters: List = emptyList()
): WebClient {
return WebClient
@@ -52,16 +60,10 @@ fun createReactiveWebClient(
else -> this
}
}
- .clientConnector(ReactorClientHttpConnector(reactorNettyClient))
+ .clientConnector(clientConnector)
.exchangeStrategies(ExchangeStrategies
.builder()
- .codecs { ccc ->
- ccc.defaultCodecs().apply {
- jackson2JsonEncoder(encoder)
- jackson2JsonDecoder(decoder)
- maxBufferSize?.let { maxInMemorySize(it) }
- }
- }
+ .codecs { ccc -> ccc.defaultCodecs().apply(codecs) }
.build()
)
.apply {
diff --git a/pom.xml b/pom.xml
index bc94bcd..63d9abe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
ru.sokomishalov.commons
commons-parent
- 1.1.9
+ 1.1.10
pom