rodolpho.couto
09/09/2019, 6:00 PMsdeleuze
09/10/2019, 1:34 PMepchris
09/12/2019, 12:55 AMepchris
09/12/2019, 2:08 AMDennis Schröder
09/12/2019, 3:13 PMRobert Jaros
09/12/2019, 6:08 PMDELETE
operation with spring-r2dbc
and coroutines, by using such code inside a suspending function:
databaseClient.execute("DELETE FROM tab WHERE field = :field").bind("field", 5).then().awaitFirstOrNull()
Spring Boot gives me the following exception in logs:
2019-09-12 19:52:05,849 [reactor-tcp-epoll-3] ERROR i.r.p.client.ReactorNettyClient - Connection Error
io.netty.util.IllegalReferenceCountException: refCnt: 0
at io.netty.buffer.AbstractByteBuf.ensureAccessible(AbstractByteBuf.java:1464)
at io.netty.buffer.CompositeByteBuf.discardReadComponents(CompositeByteBuf.java:1733)
at io.r2dbc.postgresql.message.backend.BackendMessageEnvelopeDecoder.lambda$apply$0(BackendMessageEnvelopeDecoder.java:69)
at reactor.core.publisher.FluxCreate.subscribe(FluxCreate.java:94)
at reactor.core.publisher.Flux.subscribe(Flux.java:8127)
It looks like some kind of resource leak warning, because my code is running fine and SQL statement is executed correctly.
If I run:
databaseClient.delete().from("tab").matching(where("field").`is`(5)).then().awaitFirstOrNull()
there is no exception. And there are no problems with other kind of queries (SELECT, INSERT, UPDATE).
Is this my bug? Or is this probably a bug in spring boot
or spring-r2dbc
?nfrankel
09/13/2019, 9:01 AMhttps://www.youtube.com/watch?v=f6a78mCrSeE▾
xenoterracide
09/16/2019, 6:08 PM@JsonProperty
data class RabbitMqUser(
@JsonProperty("password_hash")
val passwordHash: String,
var tags: String = ""
)
any ideas why that might be?Jason Feng
09/18/2019, 6:14 AMdata class
or class
with lateinit var
, those field in entity mostly don’t have default valuedeviant
09/18/2019, 6:42 AMmiddleName
should be nullable typeJason Feng
09/18/2019, 11:12 AMclass
with optional var
properties, for the default constructor
, take all the mandatory fields first, then the optional fields.thanksforallthefish
09/18/2019, 2:14 PMDariusz Kuc
09/18/2019, 4:10 PM@Component
annotation), i.e. equivalent of servlet FilterRegistrationBean
?Manuel Lorenzo
09/19/2019, 1:13 PMSlackbot
09/19/2019, 2:53 PMreik.schatz
09/19/2019, 4:06 PMspring-xyz-5.2.0.M2
so I guess I have to stick with the 1.2.x version of the org.jetbrains.kotlinx
libsdavidkarlsen
09/19/2019, 5:31 PMJonas Bark
09/23/2019, 7:54 AMcoRouter
context I'd like to use a TEXT_EVENT_STREAM
like this:
val flux: Flux<String> = loggingThing()
return ok()
.contentType(MediaType.TEXT_EVENT_STREAM)
.body(result, String::class.java)
but coRouter expects a ServerResponse
and not a Mono<ServerResponse>
. bodyAndAwait
wouldn't work with Please specify the element class by using body(Publisher, Class)
. Is such a thing supported out of the box with coRouter DSL or should I return to a standard router here?
Using Spring Boot 2.1.6 (and coRouter implementation from 2.2.0-M6 I think)Slackbot
09/23/2019, 2:27 PMLuis Munoz
09/24/2019, 3:12 PMDariusz Kuc
09/26/2019, 4:25 AMclass FooFilter : WebFilter {
override fun filter(exchange: ServerWebExchange, chain: WebFilterChain): Mono<Void> = mono {
foo()
}.flatMap { foo ->
chain.filter(exchange).subscriberContext { it.put("foo", foo) }
}
suspend fun foo(): Foo { ... }
}
thana
09/26/2019, 8:45 AMkschlesselmann
09/26/2019, 2:11 PM@Document
class Foo(
test: Set<String>,
val id: UUID = UUID.randomUUID()
) {
private val _test: MutableSet<String> = test.toMutableSet()
val test: Set<String>
get() = _test
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as Foo
return id == other.id
}
override fun hashCode(): Int = id.hashCode()
}
@Repository
interface FooRepository : ReactiveCrudRepository<Foo, UUID>
along with the following test
@DataMongoTest
internal class MutableCollectionTest(
@Autowired private val fooRepository: FooRepository
) {
@Test
fun `should save and retrieve Foo`() {
// Given
val foo = Foo(setOf("a", "b"))
// When
val result = fooRepository.save(foo)
.then(fooRepository.findById(foo.id))
// Then
StepVerifier.create(result)
.expectNext(foo)
.verifyComplete()
}
}
and it fails with: No property test found on entity class ….Foo to bind constructor parameter to!
Slackbot
09/27/2019, 4:49 PMrrader
09/28/2019, 1:48 PMjbnizet
09/29/2019, 8:28 AMtodd.ginsberg
10/02/2019, 2:49 PMsdeleuze
10/03/2019, 2:43 PMRobert Jaros
10/08/2019, 11:07 AMRobert Jaros
10/08/2019, 12:28 PMRobert Jaros
10/08/2019, 12:28 PMsdeleuze
10/10/2019, 3:42 AM@RestController
instead of @Controller
as specified in the documentation.