Closed
Description
Lewis opened SPR-15851 and commented
#20232 is the original report of the issue.
With Spring Boot 2.0 M3:
@ConfigurationProperties("foo")
class FooProperties(
var bar: String = "bar",
var baz: Int = 1
)
Generates this stacktrace:
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [de.techdev.xyz.FooProperties]: No corresponding Kotlin constructor found
at org.springframework.beans.BeanUtils$KotlinDelegate.instantiateClass(BeanUtils.java:742) ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:165) ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:88) ~[spring-beans-5.0.0.RC3.jar:5.0.0.RC3]
Affects: 5.0 RC3
Issue Links:
- Kotlin class instantiation with optional parameters and default values [SPR-15673] #20232 Kotlin class instantiation with optional parameters and default values
Referenced from: commits ef175d7