Package org.springframework.context.aot
Class ApplicationContextAotGenerator
java.lang.Object
org.springframework.context.aot.ApplicationContextAotGenerator
Process an
ApplicationContext
and its BeanFactory
to generate
code that represents the state of the bean factory, as well as the necessary
hints that can be used at runtime in a constrained environment.- Since:
- 6.0
- Author:
- Stephane Nicoll, Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
generateApplicationContext
(GenericApplicationContext applicationContext, GenerationContext generationContext, org.springframework.javapoet.ClassName generatedInitializerClassName) Refresh the specifiedGenericApplicationContext
and generate the necessary code to restore the state of itsBeanFactory
, using the specifiedGenerationContext
.
-
Constructor Details
-
ApplicationContextAotGenerator
public ApplicationContextAotGenerator()
-
-
Method Details
-
generateApplicationContext
public void generateApplicationContext(GenericApplicationContext applicationContext, GenerationContext generationContext, org.springframework.javapoet.ClassName generatedInitializerClassName) Refresh the specifiedGenericApplicationContext
and generate the necessary code to restore the state of itsBeanFactory
, using the specifiedGenerationContext
.- Parameters:
applicationContext
- the application context to handlegenerationContext
- the generation context to usegeneratedInitializerClassName
- the class name to use for the generated application context initializer
-