Package org.springframework.boot
Class AotApplicationContextInitializer<C extends ConfigurableApplicationContext>
java.lang.Object
org.springframework.boot.AotApplicationContextInitializer<C>
- Type Parameters:
C
- the application context type
- All Implemented Interfaces:
ApplicationContextInitializer<C>
public abstract sealed class AotApplicationContextInitializer<C extends ConfigurableApplicationContext>
extends Object
implements ApplicationContextInitializer<C>
A
ApplicationContextInitializer
wrapper used to initialize a
ConfigurableApplicationContext
using artifacts that were generated
ahead-of-time.- Since:
- 3.0.0
- Author:
- Phillip Webb
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
initialize
(C applicationContext) static <C extends ConfigurableApplicationContext>
AotApplicationContextInitializer<C>of
(String name, ApplicationContextInitializer<C> initializer) Create a newAotApplicationContextInitializer
by delegating to an existing initializer instance.static <C extends ConfigurableApplicationContext>
AotApplicationContextInitializer<C>of
(ApplicationContextInitializer<C> initializer) Create a newAotApplicationContextInitializer
by delegating to an existing initializer instance.
-
Constructor Details
-
AotApplicationContextInitializer
public AotApplicationContextInitializer()
-
-
Method Details
-
initialize
- Specified by:
initialize
in interfaceApplicationContextInitializer<C extends ConfigurableApplicationContext>
-
of
public static <C extends ConfigurableApplicationContext> AotApplicationContextInitializer<C> of(ApplicationContextInitializer<C> initializer) Create a newAotApplicationContextInitializer
by delegating to an existing initializer instance.- Type Parameters:
C
- the application context type- Parameters:
initializer
- the initializer to delegate to- Returns:
- a new
AotApplicationContextInitializer
instance
-
of
public static <C extends ConfigurableApplicationContext> AotApplicationContextInitializer<C> of(String name, ApplicationContextInitializer<C> initializer) Create a newAotApplicationContextInitializer
by delegating to an existing initializer instance.- Type Parameters:
C
- the application context type- Parameters:
initializer
- the initializer to delegate toname
- the name of the initializer- Returns:
- a new
AotApplicationContextInitializer
instance
-