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
This commit reorganizes the asciidoctor attributes for the reference
documentation. Instead of being contributed partially by the build and
individual documents, attributes are now shared in common files that are
included in top sections.
Copy file name to clipboardExpand all lines: framework-docs/src/docs/asciidoc/core/core-aot.adoc
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
[[aot]]
1
+
[[core.aot]]
2
2
= Ahead of Time Optimizations
3
3
4
4
This chapter covers Spring's Ahead of Time (AOT) optimizations.
@@ -28,7 +28,7 @@ A Spring AOT processed application typically generates:
28
28
NOTE: At the moment, AOT is focused on allowing Spring applications to be deployed as native images using GraalVM.
29
29
We intend to support more JVM-based use cases in future generations.
30
30
31
-
[[aot-basics]]
31
+
[[core.aot.basics]]
32
32
== AOT engine overview
33
33
34
34
The entry point of the AOT engine for processing an `ApplicationContext` arrangement is `ApplicationContextAotGenerator`. It takes care of the following steps, based on a `GenericApplicationContext` that represents the application to optimize and a {api-spring-framework}/aot/generate/GenerationContext.html[`GenerationContext`]:
@@ -44,7 +44,7 @@ The `RuntimeHints` instance can also be used to generate the relevant GraalVM na
44
44
45
45
Those steps are covered in greater detail in the sections below.
46
46
47
-
[[aot-refresh]]
47
+
[[core.aot.refresh]]
48
48
== Refresh for AOT Processing
49
49
50
50
Refresh for AOT processing is supported on all `GenericApplicationContext` implementations.
@@ -88,7 +88,7 @@ This makes sure to create any proxy that will be required at runtime.
88
88
89
89
One this part completes, the `BeanFactory` contains the bean definitions that are necessary for the application to run. It does not trigger bean instantiation but allows the AOT engine to inspect the beans that will be created at runtime.
Components that want to participate in this step can implement the {api-spring-framework}/beans/factory/aot/BeanFactoryInitializationAotProcessor.html[`BeanFactoryInitializationAotProcessor`] interface.
@@ -111,7 +111,7 @@ If such a bean is registered using an `@Bean` factory method, ensure the method
111
111
====
112
112
113
113
114
-
[[aot-bean-registration-contributions]]
114
+
[[core.aot.bean-registration-contributions]]
115
115
=== Bean Registration AOT Contributions
116
116
117
117
A core `BeanFactoryInitializationAotProcessor` implementation is responsible for collecting the necessary contributions for each candidate `BeanDefinition`.
@@ -198,7 +198,7 @@ When a `datasource` instance is required, a `BeanInstanceSupplier` is called.
198
198
This supplier invokes the `dataSource()` method on the `dataSourceConfiguration` bean.
199
199
200
200
201
-
[[aot-hints]]
201
+
[[core.aot.hints]]
202
202
== Runtime Hints
203
203
204
204
Running an application as a native image requires additional information compared to a regular JVM runtime.
@@ -222,7 +222,7 @@ For cases that the core container cannot infer, you can register such hints prog
222
222
A number of convenient annotations are also provided for common use cases.
223
223
224
224
225
-
[[aot-hints-import-runtime-hints]]
225
+
[[core.aot.hints.import-runtime-hints]]
226
226
=== `@ImportRuntimeHints`
227
227
228
228
`RuntimeHintsRegistrar` implementations allow you to get a callback to the `RuntimeHints` instance managed by the AOT engine.
@@ -254,7 +254,7 @@ This way, if the component is not contributed to the `BeanFactory`, the hints wo
254
254
It is also possible to register an implementation statically by adding an entry in `META-INF/spring/aot.factories` with a key equal to the fully qualified name of the `RuntimeHintsRegistrar` interface.
255
255
256
256
257
-
[[aot-hints-reflective]]
257
+
[[core.aot.hints.reflective]]
258
258
=== `@Reflective`
259
259
260
260
{api-spring-framework}/aot/hint/annotation/Reflective.html[`@Reflective`] provides an idiomatic way to flag the need for reflection on an annotated element.
@@ -268,7 +268,7 @@ Library authors can reuse this annotation for their own purposes.
268
268
If components other than Spring beans need to be processed, a `BeanFactoryInitializationAotProcessor` can detect the relevant types and use `ReflectiveRuntimeHintsRegistrar` to process them.
{api-spring-framework}/aot/hint/annotation/RegisterReflectionForBinding.html[`@RegisterReflectionForBinding`] is a specialization of `@Reflective` that registers the need for serializing arbitrary types.
0 commit comments