Skip to content

Add auto-configuration support for TransactionalOperator #18265

@mp911de

Description

@mp911de

With Spring Framework 5.2, ReactiveTransactionManager was introduced to support reactive transactions.

Currently, TransactionAutoConfiguration depends on the presence of a PlatformTransactionManager bean. Spring Framework 5.2 introduced TransactionManager as a general interface for imperative and reactive transaction managers.

Additionally, TransactionalOperator (reactive programmatic variant of TransactionTemplate) was introduced.

It would make sense to reflect these changes with:

  • Enabling EnableTransactionManagementConfiguration on the presence of a TransactionManager bean instead of PlatformTransactionManager
  • Add a configuration for TransactionalOperator when a ReactiveTransactionManager bean is present

Reactive transactions can be tested using MongoDB via org.springframework.data.mongodb.ReactiveMongoTransactionManager. Integrative tests running actual queries require a MongoDB replica set to be running.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions