corneil
01/13/2025, 3:46 PMorg.springframework.boot:spring-boot-configuration-processor
to ensure propeties classes with @ConfigurationProperties
are properly detected.mathias8dev
01/16/2025, 11:04 AMursus
01/18/2025, 11:45 PMList
working with restTemplate.getForObject<List<X>>
kotlin extension? I'm getting class cast exceptionskurt_steiner
01/21/2025, 2:00 PMursus
01/28/2025, 3:19 AMlistOf(
Person(
name = "foo",
age = 44,
fooBar = "lol",
isImportant = true,
isNew = true
)
)
Why does this get serialized into json as [{"id":null,"name":"foo","age":44,"fooBar":"lol","new":true,"important":true}]
?
I.e. missing the is
prefixes?
What's even worse is when I try to deserialize the same json that was just serialized, I'll get errors.
Broken by defaultEugen Martynov
01/30/2025, 9:31 AMTeodor Irkhin
01/31/2025, 10:01 AMsdeleuze
02/14/2025, 5:39 PM@Configuration
with functional bean registration. Feedback is welcome. https://github.com/spring-projects/spring-framework/issues/18353#issuecomment-2659889622sdeleuze
02/14/2025, 5:50 PMRobert Jaros
02/14/2025, 6:08 PMinitialize
method is executed). Am I correct?sdeleuze
02/14/2025, 8:10 PMElise
03/02/2025, 1:01 PMRobert Jaros
03/02/2025, 8:47 PMspring-dependency-management
plugin and Kotlin/JS compiler? Not long ago I've reported it breaks incremental compilation of K/JS (https://youtrack.jetbrains.com/issue/KT-74378). Now I have problems with serialization (see: https://kotlinlang.slack.com/archives/C7A1U5PTM/p1740943473638099). I've always thought this plugin just reads some BOMs and auto-applies correct version of various dependencies. But how it is possible that it breaks compilation?sdeleuze
03/06/2025, 6:56 PMEric
03/27/2025, 12:52 PMAbstractRoutingConnectionFactory
and override getTargetConnectionFactory
. My function signature is just override fun getTargetConnectionFactory(lookupKey: Any?): ConnectionFactory?
but the compiler is rejecting that, and only accepts override fun getTargetConnectionFactory(lookupKey: Any): ConnectionFactory
. Looking at how getTargetConnectionFactory
is used, it can clearly accept a null lookupKey
and return a null ConnectionFactory
. Am I missing something obvious here? I don't see any nullability annotations on getTargetConnectionFactory
AbstractRoutingConnectionFactory
or any package-info.java
that specifies package-wide null behavior. Spring Boot 3.4.3, spring-rabbit 3.2.3, Kotlin 1.9.23.horse_badorties
03/31/2025, 2:11 PMthanksforallthefish
04/02/2025, 8:08 AM// producer thread, saves its trace information within the message
producer.produce(message.withTraceDetails())
// consumer thread, actually even another application instance
// up to this consumer.read, its an independent trace
val message = consumer.read()
processAfterRestoring(message.traceDetails()) {
// here the trace is restored from the message
process(message)
}
fun processAfterRestoring(sourceTrace: Trace, supplier: () -> Any)
The code we have works in normal scenarios, but not when process(message)
uses coroutines, eg
// here we have TraceONE
val message = consumer.read()
processAfterRestoring(message.traceDetails()) {
// here the trace is restored from the message
process(message)
}
fun process(message: Message) {
// here the trace is restored from the message
launchNewCoroutine {
// but here the trace is again TraceONE
doSomethingOn(message)
}
}
fun processAfterRestoring(sourceTrace: Trace, supplier: () -> Any)
I reproduce some more code (in thread, hopefully I captured all the relevant pieces).
I guess the 3 questions that pop up to me are:
• are we restoring traces incorrectly (not kotlin)?
• is there some issue with our Spring context config (also not kotlin)?
• what magic am I not seeing in observationRegistry.asContextElement()
that causes the issue (since when we don't use coroutines, restoring works I am kinda discounting the first 2 questions and focusing more on this last one)?Pritt Balagopal
04/02/2025, 7:36 PMorg.springframework.lang
? The online Javadoc for the website does indicate that it does https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/lang/package-summary.html however, on Kotlin's own source file, it is not mentioned anywhere here: https://github.com/JetBrains/kotlin/blob/master/core/compiler.common.jvm/src/org/jetbrains/kotlin/load/java/JvmAnnotationNames.kt. I am confused, does Kotlin support it or not? And if so, how does it do so despite not being listed?Edgar
04/12/2025, 10:37 AMPihentagy
04/14/2025, 10:46 AMcreatedAt
field in my @Entity
. and it gets its value as the Entity is created. Can this info be utilized, so that "all saved entity has non-null createdAt" at kotlin level, or do I have to check against null every time? Or I have no choice but declare it as
var timestamp: Instant? = null,
Emil Kantis
04/29/2025, 11:01 AMChannel
?Alex
05/09/2025, 5:32 PMFrancisco Ripoli
05/22/2025, 1:50 PMspring-boot-parent pom
?
spring-boot-parent
The spring-boot-parent module is no longer published. It provides dependency management for internal dependencies used, for example, in Spring Boot's own tests. If you were using spring-boot-parent, replace it with dependency management of your own that meets your application's needs.
sdeleuze
05/26/2025, 6:20 AMPaul N
05/30/2025, 12:40 PMcontext.initializer.classes: mypackage.BeansInitializer
So instead I've used META-INF/spring.factories:
org.springframework.context.ApplicationContextInitializer=\
mypackage.BeansInitializer
and my application breaks.
The issue is that in my BeansInitializer class I'm using ref() to inject a bean that is created via an @Component annotation in a jar file.
The trouble is that now the initalizer seems to run before it's dependent bean is created, so I get a message like this:
A component required a bean of type 'Whatever' that could not be found.
How do correctly use the kotlin beans DSL in Spring 3.4.5 ?
NB I can't modify the main function to add the initializer that way as that only works for the main application, not tests, and I don't want to add the initializer to loads of integration tests either.Kev
06/21/2025, 8:45 AM2025-06-21T10:42:16.910+02:00 WARN 74817 --- [app] [ Test worker] com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to validate connection org.postgresql.jdbc.PgConnection@5a0c0680 (This connection has been closed.). Possibly consider using a shorter maxLifetime value.
My base test class looks like this:
@Testcontainers
abstract class SpringBootTestBase {
companion object {
@Container
@JvmStatic
val postgres = PostgreSQLContainer<Nothing>("postgres:15").apply {
withDatabaseName("testdb")
withUsername("test")
withPassword("test")
}
@JvmStatic
@DynamicPropertySource
fun registerPgProperties(registry: DynamicPropertyRegistry) {
registry.add("spring.datasource.url", postgres::getJdbcUrl)
registry.add("spring.datasource.username", postgres::getUsername)
registry.add("spring.datasource.password", postgres::getPassword)
}
}
}
I have overridden properties for hikari. I have no special test properties either.
Any idea?Distractic
07/09/2025, 8:56 PM