-
Notifications
You must be signed in to change notification settings - Fork 41.9k
Document how and where to add custom GraalVM configuration files #42515
Copy link
Copy link
Closed
Description
Version information
Spring Boot version: 3.3.4
Bug description
When you place a
reflection-config.jsonproxy-config.jsonresource-config.jsonserialization-config.json
into
src/main/resources/META-INF/native-image/<groupid>/<artifactid>/
and you perform a process-aot with spring-boot-maven-plugin the configuration files that you have defined in your project are not merged with those the plugin is generating.
Instead the plugin overwrites the configuration which clashes with the documentation of https://www.graalvm.org/latest/reference-manual/native-image/metadata/.
The current workaround is that you have to write a RuntimeHintsRegistrar and define the definitions there.
@Configuration
@ImportRuntimeHints(MyRuntimeHints.class)
@Slf4j
public class MyRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, ClassLoader classLoader) {
//....
}
}With a RuntimeHintsRegistrar the plugin is adding the entries to the desired files.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
type: documentationA documentation updateA documentation update