Class LegacyJdbcSagaStoreAutoConfiguration

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

@AutoConfiguration(after=LegacyJpaSagaStoreAutoConfiguration.class, afterName="org.axonframework.extension.springboot.autoconfig.JdbcAutoConfiguration") @ConditionalOnClass(JdbcSagaStore.class) @ConditionalOnBean(javax.sql.DataSource.class) public class LegacyJdbcSagaStoreAutoConfiguration extends Object
Autoconfiguration class that registers a JdbcSagaStore when a DataSource is available, ported from Axon Framework 4's JDBC saga store wiring onto axon-legacy's JdbcSagaStore builder.

Provides two bean methods, matching Axon Framework 4's bean names verbatim:

Runs after org.axonframework.extension.springboot.autoconfig.JdbcAutoConfiguration, so the ConnectionProvider bean it provides is available, and after LegacyJpaSagaStoreAutoConfiguration, so a JPA-backed store, when applicable, takes precedence over this JDBC-backed one -- both ConditionalOnMissingBean checks target SagaStore, so whichever autoconfiguration runs first wins when an application has both an EntityManagerFactory and a DataSource. The ordering reference to JdbcAutoConfiguration uses AutoConfiguration.afterName() rather than AutoConfiguration.after() so that axon-legacy carries no compile-time dependency on the axon-spring-boot-autoconfigure module.

Since:
5.4.0
Author:
Mateusz Nowak