Class LegacySagaAutoConfiguration

java.lang.Object
org.axonframework.extension.springboot.autoconfig.LegacySagaAutoConfiguration

@AutoConfiguration(afterName={"org.axonframework.extension.springboot.autoconfig.LegacyJpaSagaStoreAutoConfiguration","org.axonframework.extension.springboot.autoconfig.LegacyJdbcSagaStoreAutoConfiguration"}) @ConditionalOnClass(SagaStore.class) public class LegacySagaAutoConfiguration extends Object
Autoconfiguration class enabling Spring Boot support for Axon Framework 4 Saga-annotated types, ported into axon-legacy.

Registers the SpringSagaLookup that discovers @Saga-annotated beans, and provides an InMemorySagaStore as a last-resort SagaStore bean. Without any SagaStore component, SagaConfigurer.forType(...) refuses to build a Saga's EventHandlingComponent at all, so a store is a hard requirement, not merely a convenience. Axon Framework 4 hid this same default inside its SagaConfigurer; here it is an explicit, overridable bean instead.

Activates only when axon-legacy is present on the classpath (evidenced by SagaStore being loadable). LegacyJpaSagaStoreAutoConfiguration and LegacyJdbcSagaStoreAutoConfiguration run before this class so their SagaStore beans, when applicable, take precedence over the in-memory fallback.

Since:
5.4.0
Author:
Mateusz Nowak