-
Couldn't load subscription status.
- Fork 38.8k
Closed as not planned
Closed as not planned
Copy link
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid
Description
Issue Description
When using Spring Boot 3.x with GraalVM native compilation, I have two classes:
class RSocketFeignRuntimeHints : RuntimeHintsRegistrar {
override fun registerHints(hints: RuntimeHints, classLoader: ClassLoader?) {
// Register hints for RSocket Feign classes
}
}
class RSocketClientsRegistrar : ImportBeanDefinitionRegistrar {
override fun registerBeanDefinitions(metadata: AnnotationMetadata, registry: BeanDefinitionRegistry) {
// Register RSocket client beans
}
}Expected Behavior
During native compilation:
RuntimeHintsRegistrarshould be executed first to register necessary hints- Then
ImportBeanDefinitionRegistrarshould be executed to register beans
Actual Behavior
When running ./gradlew nativeCompile:
ImportBeanDefinitionRegistraris executed first- The compilation fails because necessary hints are not registered
RuntimeHintsRegistraris not executed at all
Configuration
# src/main/resources/META-INF/spring/org.springframework.aot.hint.RuntimeHintsRegistrar
org.fu.common.feign.model.RSocketFeignRuntimeHints
# src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
org.fu.common.feign.RSocketClientsRegistrar
Question
How can we ensure RuntimeHintsRegistrar is executed before ImportBeanDefinitionRegistrar during native compilation?
Environment
- Spring Boot: 3.3.5
- GraalVM CE: 21.0.2
- Gradle: 8.5
This seems to be a timing issue in Spring's AOT processing pipeline. Any suggestions on how to control the execution order would be appreciated.
Metadata
Metadata
Assignees
Labels
for: stackoverflowA question that's better suited to stackoverflow.comA question that's better suited to stackoverflow.comstatus: invalidAn issue that we don't feel is validAn issue that we don't feel is valid