You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 23, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: spring-native-docs/src/main/asciidoc/native-hints.adoc
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,10 +28,10 @@ There should not really be a trigger specified on hints included `initialization
28
28
Hints can be provided statically using an annotated model, or programmatically by implementing one of the callback interfaces.
29
29
30
30
=== Annotated Hints
31
-
Annotated hints can be put on any `@Configuration`-annotated class of your application, including `@SpringBootApplication`:
31
+
{spring-native-api}/org/springframework/nativex/hint/package-summary.html[Annotated hints] can be put on any `@Configuration`-annotated class of your application, including `@SpringBootApplication`:
32
32
33
-
* `@TypeHint` for simple reflection hints
34
-
* `@NativeHint` is a container for `@TypeHint` and offer more options.
33
+
* {spring-native-api}/org/springframework/nativex/hint/TypeHint.html[`@TypeHint`] for simple reflection hints
34
+
* {spring-native-api}/org/springframework/nativex/hint/NativeHint.html[`@NativeHint`] is a container for `@TypeHint` and offer more options.
35
35
36
36
Let us take an example of an application using `WebClient` to deserialize a `Data` class with a `SuperHero` nested class using Jackson.
37
37
Such process requires reflective access to the class and can be configured as shown in the following example.
@@ -53,13 +53,13 @@ Hints classes should implement `NativeConfiguration` and be registered in `META-
53
53
If you need some concrete example of hints, you can {github-tree}/spring-native-configuration/src/main/java[browse ours].
54
54
55
55
=== Programmatic Hints
56
-
Spring Native provides a {github-tree}/spring-aot/src/main/java/org/springframework/aot/context/bootstrap/generator/infrastructure/nativex/NativeConfigurationRegistry.java[programmatic registry] which exposes a high-level API for all hints.
56
+
Spring Native provides a {spring-native-api}/org/springframework/aot/context/bootstrap/generator/infrastructure/nativex/NativeConfigurationRegistry.html[programmatic registry] which exposes a high-level API for all hints.
57
57
58
58
Three callbacks are provided:
59
59
60
-
. `BeanFactoryNativeConfigurationProcessor` provides the `BeanFactory` so that it can be introspected for matching beans.
61
-
. `BeanNativeConfigurationProcessor` provides a `BeanInstanceDescriptor` for each bean.
62
-
. `NativeConfiguration` typically used for hints not related to beans or `BeanFactory`.
60
+
. {spring-native-api}/org/springframework/aot/context/bootstrap/generator/infrastructure/nativex/BeanFactoryNativeConfigurationProcessor.html[`BeanFactoryNativeConfigurationProcessor`] provides the `BeanFactory` so that it can be introspected for matching beans.
61
+
. {spring-native-api}/org/springframework/aot/context/bootstrap/generator/infrastructure/nativex/BeanNativeConfigurationProcessor.html[`BeanNativeConfigurationProcessor`] provides a `BeanInstanceDescriptor` for each bean.
62
+
. {spring-native-api}/org/springframework/nativex/type/NativeConfiguration.html[`NativeConfiguration`] typically used for hints not related to beans or `BeanFactory`.
63
63
64
64
WARNING: Those types are available via the `org.springframework.experimental:spring-aot` dependency which should not be in the runtime classpath, so you should typically use `<scope>provided</scope>` with Maven or `compileOnly` configuration with Gradle.
0 commit comments