Skip to content

Commit d0e9168

Browse files
committed
Merge branch '3.2.x' into 3.3.x
Closes gh-43073
2 parents 1ae9b8e + bebdf69 commit d0e9168

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
@@ -157,7 +157,7 @@ For further reading, please see {url-graal-docs-native-image}/metadata/Automatic
157157
[[packaging.native-image.advanced.custom-hints]]
158158
== Custom Hints
159159

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

163163
include-code::MyRuntimeHints[]
@@ -182,6 +182,15 @@ include-code::MyRuntimeHintsTests[]
182182

183183

184184

185+
[[packaging.native-image.advanced.custom-hints.static]]
186+
=== Providing Hints Statically
187+
If you prefer, custom hints can be provided statically in one or more GraalVM JSON hint files.
188+
Such files should be placed in `src/main/resources/` within a `+META-INF/native-image/*/*/+` directory.
189+
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}/+`.
190+
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/+`.
191+
192+
193+
185194
[[packaging.native-image.advanced.known-limitations]]
186195
== Known Limitations
187196

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)