try { findComponent(PlatformTransactionManager.class).ifPresent( ptm -> configurer.configureTransactionManager(c -> new SpringTransactionManager(getBean(ptm, c)))); } catch (NoClassDefFoundError error) { .ifPresent(tm -> configurer.configureTransactionManager(c -> getBean(tm, c))); findComponent(SagaStore.class) .ifPresent(sagaStore -> configurer.registerComponent(SagaStore.class, c -> getBean(sagaStore, c)));