-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Kotlin ConfigurationProperties default values are not picked up when nativeRun is used #34157
Comments
Found a possible work-around for this issue.
|
Thanks for the reproducer. Compilation of the
The reflection config that's generated at build time only permits access to one of these constructors: {
"name": "com.example.gh34157.AppProperties",
"queryAllDeclaredMethods": true,
"methods": [
{
"name": "<init>",
"parameterTypes": [
"boolean"
]
}
]
}, In the case of a Kotlin data class, @sdeleuze Does Kotlin Reflect allow the constructors that are associated with |
I think you should allow the invocation of all declared constructors for Kotlin data classes. |
Thank you, @sdeleuze. |
…iling. Readings: - https://www.graalvm.org/22.2/reference-manual/native-image/guides/use-native-image-gradle-plugin/ - https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.advanced.custom-hints - https://github.com/oracle/graalvm-reachability-metadata - spring-projects/spring-boot#34157 - https://docs.spring.io/spring-framework/reference/core/aot.html#aot.hints.register-reflection-for-binding - https://docs.spring.io/spring-framework/reference/core/aot.html - https://betterprogramming.pub/experience-in-migrating-an-application-to-native-image-with-spring-boot-3-422d15efa31
…iling. Readings: - https://www.graalvm.org/22.2/reference-manual/native-image/guides/use-native-image-gradle-plugin/ - https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.advanced.custom-hints - https://github.com/oracle/graalvm-reachability-metadata - spring-projects/spring-boot#34157 - https://docs.spring.io/spring-framework/reference/core/aot.html#aot.hints.register-reflection-for-binding - https://docs.spring.io/spring-framework/reference/core/aot.html - https://betterprogramming.pub/experience-in-migrating-an-application-to-native-image-with-spring-boot-3-422d15efa31
…iling. Readings: - https://www.graalvm.org/22.2/reference-manual/native-image/guides/use-native-image-gradle-plugin/ - https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html#native-image.advanced.custom-hints - https://github.com/oracle/graalvm-reachability-metadata - spring-projects/spring-boot#34157 - https://docs.spring.io/spring-framework/reference/core/aot.html#aot.hints.register-reflection-for-binding - https://docs.spring.io/spring-framework/reference/core/aot.html - https://betterprogramming.pub/experience-in-migrating-an-application-to-native-image-with-spring-boot-3-422d15efa31
spring-boot version: 3.0.2
gradle file from example application:
Example application:
Exception that is thrown when command
./gradlew nativeRun
is run:But it works us expected if command
./gradlew bootRun
is run.The text was updated successfully, but these errors were encountered: