Spring Framework 5.2 has introduced a parent for the PlatfromTransactionManager that's also a parent for the newly introduced ReactiveTransactionManager.

Our auto-configuration is checking the specific type at the moment. If we are auto-configuring a PlatformTransactionManager we check for that, and same for ReactiveTransactionManager for auto-configuring a reactive transaction manager.

The problem is that we can end up in a situation where we have two TransactionManager beans, a PlatformTransactionManager and a ReactiveTransactionManager. Considering that framework expects a single bean of that type for unqualified @Transactional use, I think we should refine our auto-configuration to avoid that by default.

This affects neo4j in particular as they ship both the imperative and reactive style in the same driver and the presence of Reactor on the classpath is the only trigger (which could be very common and for unrelated reasons, like using WebClient).

See also https://github.com/spring-projects/spring-framework/issues/25532 and https://github.com/spring-projects/spring-boot/issues/22692

Comment From: snicoll

Spring Boot now backs off in the presence of a TransactionManager (vs. PlatformTransactionManager). This prevents that both an imperative and reactive transaction managers are auto-configured. See #22692 for a follow-up on the underlying issue.