public class SpringAxonConfiguration extends Object implements org.springframework.beans.factory.FactoryBean<Configuration>, org.springframework.context.SmartLifecycle
Configuration for a Configurer. This allows a Configuration bean to be available in an Application Context that already defines a Configurer.
This factory bean will also ensure the Configuration's lifecycle is attached to the Spring Application
lifecycle.
| Modifier and Type | Field and Description |
|---|---|
static int |
LIFECYCLE_PHASE
The
SmartLifecycle.getPhase() value of this is set to be safely lower than the typical
values listed in the Spring WebServer lifecycles. |
| Constructor and Description |
|---|
SpringAxonConfiguration(Configurer configurer)
Initialize this
Configuration instance. |
| Modifier and Type | Method and Description |
|---|---|
Configuration |
getObject() |
Class<?> |
getObjectType() |
int |
getPhase() |
boolean |
isRunning() |
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
start() |
void |
stop() |
public static final int LIFECYCLE_PHASE
SmartLifecycle.getPhase() value of this is set to be safely lower than the typical
values listed in the Spring WebServer lifecycles.
This means we make sure that:
- Axon is ready when the web server starts
- The web server is stopped before tearing down Axonpublic SpringAxonConfiguration(Configurer configurer)
Configuration instance.configurer - The configurer to get the Configuration from.@NonNull public Configuration getObject()
getObject in interface org.springframework.beans.factory.FactoryBean<Configuration>public Class<?> getObjectType()
getObjectType in interface org.springframework.beans.factory.FactoryBean<Configuration>public void start()
start in interface org.springframework.context.Lifecyclepublic void stop()
stop in interface org.springframework.context.Lifecyclepublic boolean isRunning()
isRunning in interface org.springframework.context.Lifecycle@Autowired public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
public int getPhase()
getPhase in interface org.springframework.context.PhasedgetPhase in interface org.springframework.context.SmartLifecycleCopyright © 2010–2025. All rights reserved.