Skip to content

Commit 9975113

Browse files
committed
Enable new build options for GraalVM 25 native image builds
Closes gh-35616
1 parent b2c84ac commit 9975113

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

spring-context/src/main/java/org/springframework/context/aot/ContextAotProcessor.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ protected List<String> getDefaultNativeImageArguments(String applicationClassNam
139139
args.add("--report-unsupported-elements-at-runtime");
140140
args.add("--no-fallback");
141141
args.add("--install-exit-handlers");
142+
args.add("--future-defaults=all");
143+
args.add("--exact-reachability-metadata");
142144
return args;
143145
}
144146

spring-context/src/test/java/org/springframework/context/aot/ContextAotProcessorTests.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,9 @@ private Consumer<Path> hasGeneratedAssetsForSampleApplication() {
113113
Args = -H:Class=org.springframework.context.aot.ContextAotProcessorTests$SampleApplication \\
114114
--report-unsupported-elements-at-runtime \\
115115
--no-fallback \\
116-
--install-exit-handlers
116+
--install-exit-handlers \\
117+
--future-defaults=all \\
118+
--exact-reachability-metadata
117119
""");
118120
};
119121
}

0 commit comments

Comments
 (0)