Closed czp3009 closed 1 month ago
workaround for someone else also meet this problem:
class SpringDataJacksonHints: RuntimeHintsRegistrar {
override fun registerHints(hints: RuntimeHints, classLoader: ClassLoader?) {
hints.reflection().registerType(TypeReference.of(
"org.springframework.data.web.config.SpringDataJacksonConfiguration\$PageModule\$PageModelConverter"
), MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)
hints.reflection().registerType(TypeReference.of(
"org.springframework.data.web.config.SpringDataJacksonConfiguration\$PageModule\$PlainPageSerializationWarning"
), MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)
}
}
Thank you @czp3009 for raising the issue and the reproducer.
With
@EnableSpringDataWebSupport
in graalvm native image, requests will always return 500Consider following code:
response:
log:
issue reproduction repository: https://github.com/czp3009/spring-EnableSpringDataWebSupport-not-working-in-native-image
please follow the steps in the repository README to reproduce
========================================================= More discoveries: there is the same result whether pageSerializationMode is specified or not. log of another case: