Class DmxFunSpringAutoConfiguration
Registers TxResult, TxTry, and TxValidated when
spring-tx is on the classpath and exactly one
PlatformTransactionManager bean is present (or multiple with one
marked @Primary). Additionally enables AspectJ auto-proxying and
registers DmxTransactionalAspect when aspectjweaver is also
present.
All beans are guarded by ConditionalOnMissingBean so application
code can override any of them with a custom @Bean declaration.
Individual beans can also be disabled via application.properties
(e.g. dmx.fun.tx-result.enabled=false).
This class uses Spring Boot-specific annotations (@AutoConfiguration,
ConditionalOnMissingBean, ConditionalOnProperty,
ConditionalOnSingleCandidate) provided by spring-boot-autoconfigure.
It is registered in
META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports
and is picked up automatically by Spring Boot — no manual configuration is required.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor required for Spring Boot auto-configuration instantiation. -
Method Summary
Modifier and TypeMethodDescriptiontxResult(org.springframework.transaction.PlatformTransactionManager txManager) Registers aTxResultbacked by the primary transaction manager.txTry(org.springframework.transaction.PlatformTransactionManager txManager) Registers aTxTrybacked by the primary transaction manager.txValidated(org.springframework.transaction.PlatformTransactionManager txManager) Registers aTxValidatedbacked by the primary transaction manager.
-
Constructor Details
-
DmxFunSpringAutoConfiguration
public DmxFunSpringAutoConfiguration()Default constructor required for Spring Boot auto-configuration instantiation.
-
-
Method Details
-
txResult
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(name="dmx.fun.tx-result.enabled", havingValue="true", matchIfMissing=true) public TxResult txResult(org.springframework.transaction.PlatformTransactionManager txManager) Registers aTxResultbacked by the primary transaction manager. Can be disabled viadmx.fun.tx-result.enabled=false.- Parameters:
txManager- the transaction manager to back the executor- Returns:
- a ready-to-use
TxResultinstance
-
txTry
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(name="dmx.fun.tx-try.enabled", havingValue="true", matchIfMissing=true) public TxTry txTry(org.springframework.transaction.PlatformTransactionManager txManager) Registers aTxTrybacked by the primary transaction manager. Can be disabled viadmx.fun.tx-try.enabled=false.- Parameters:
txManager- the transaction manager to back the executor- Returns:
- a ready-to-use
TxTryinstance
-
txValidated
@Bean @ConditionalOnMissingBean @ConditionalOnProperty(name="dmx.fun.tx-validated.enabled", havingValue="true", matchIfMissing=true) public TxValidated txValidated(org.springframework.transaction.PlatformTransactionManager txManager) Registers aTxValidatedbacked by the primary transaction manager. Can be disabled viadmx.fun.tx-validated.enabled=false.- Parameters:
txManager- the transaction manager to back the executor- Returns:
- a ready-to-use
TxValidatedinstance
-