Skip to content

Commit 5d8047a

Browse files
committed
Merge branch '3.3.x'
Closes gh-43074
2 parents 1e8b23e + d0e9168 commit 5d8047a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/native-image/advanced-topics.adoc

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ For further reading, please see {url-graal-docs-native-image}/metadata/Automatic
158158
[[packaging.native-image.advanced.custom-hints]]
159159
== Custom Hints
160160

161-
If you need to provide your own hints for reflection, resources, serialization, proxy usage etc. you can use the `RuntimeHintsRegistrar` API.
161+
If you need to provide your own hints for reflection, resources, serialization, proxy usage and so on, you can use the `RuntimeHintsRegistrar` API.
162162
Create a class that implements the `RuntimeHintsRegistrar` interface, and then make appropriate calls to the provided `RuntimeHints` instance:
163163

164164
include-code::MyRuntimeHints[]
@@ -183,6 +183,15 @@ include-code::MyRuntimeHintsTests[]
183183

184184

185185

186+
[[packaging.native-image.advanced.custom-hints.static]]
187+
=== Providing Hints Statically
188+
If you prefer, custom hints can be provided statically in one or more GraalVM JSON hint files.
189+
Such files should be placed in `src/main/resources/` within a `+META-INF/native-image/*/*/+` directory.
190+
The xref:packaging/native-image/introducing-graalvm-native-images.adoc#packaging.native-image.introducing-graalvm-native-images.understanding-aot-processing[hints generated during AOT processing] are written to a directory named `+META-INF/native-image/{groupId}/{artifactId}/+`.
191+
Place your static hint files in a directory that does not clash with this location, such as `+META-INF/native-image/{groupId}/{artifactId}-additional-hints/+`.
192+
193+
194+
186195
[[packaging.native-image.advanced.known-limitations]]
187196
== Known Limitations
188197

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/packaging/native-image/introducing-graalvm-native-images.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,15 @@ A Spring AOT processed application will typically generate:
5656

5757
* Java source code
5858
* Bytecode (for dynamic proxies etc)
59-
* GraalVM JSON hint files:
59+
* GraalVM JSON hint files in `+META-INF/native-image/{groupId}/{artifactId}/+`:
6060
- Resource hints (`resource-config.json`)
6161
- Reflection hints (`reflect-config.json`)
6262
- Serialization hints (`serialization-config.json`)
6363
- Java Proxy Hints (`proxy-config.json`)
6464
- JNI Hints (`jni-config.json`)
6565

66+
If the generated hints are not sufficient, you can also xref:packaging/native-image/advanced-topics.adoc#packaging.native-image.advanced.custom-hints[provide your own].
67+
6668

6769

6870
[[packaging.native-image.introducing-graalvm-native-images.understanding-aot-processing.source-code-generation]]

0 commit comments

Comments
 (0)