Skip to content
This repository has been archived by the owner on Nov 2, 2021. It is now read-only.

Commit

Permalink
fixiki
Browse files Browse the repository at this point in the history
  • Loading branch information
sokomishalov committed Feb 11, 2020
1 parent d9a7df5 commit f67c160
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 31 deletions.
4 changes: 2 additions & 2 deletions commons-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</parent>

<artifactId>commons-core</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>

<dependencies>

Expand Down
6 changes: 3 additions & 3 deletions commons-coroutines/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</parent>

<artifactId>commons-coroutines</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>

<dependencies>
<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-core</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ import kotlin.coroutines.EmptyCoroutineContext

fun <T> aFlux(
context: CoroutineContext = EmptyCoroutineContext,
block: suspend () -> Iterable<T>
block: suspend CoroutineScope.() -> Iterable<T>
): Flux<T> {
return flux(context) { block().forEach { send(it) } }
}
Expand Down
6 changes: 3 additions & 3 deletions commons-logging/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</parent>

<artifactId>commons-logging</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>

<dependencies>
<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-core</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions commons-reactor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</parent>

<artifactId>commons-reactor</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>

<dependencies>
<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-core</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
Expand Down
6 changes: 3 additions & 3 deletions commons-serialization/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</parent>

<artifactId>commons-serialization</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>

<dependencies>
<!-- COMPILE DEPS -->

<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-core</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
Expand Down
14 changes: 7 additions & 7 deletions commons-spring/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</parent>

<artifactId>commons-spring</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>

<dependencies>

Expand All @@ -20,19 +20,19 @@
<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-core</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-serialization</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
</dependency>

<dependency>
Expand All @@ -58,14 +58,14 @@
<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-reactor</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
<optional>true</optional>
</dependency>

<dependency>
<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-coroutines</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
<optional>true</optional>
</dependency>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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<ExchangeFilterFunction> = emptyList()
): WebClient {
return WebClient
Expand All @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>ru.sokomishalov.commons</groupId>
<artifactId>commons-parent</artifactId>
<version>1.1.9</version>
<version>1.1.10</version>
<packaging>pom</packaging>

<properties>
Expand Down

0 comments on commit f67c160

Please sign in to comment.