Fix typo in data-access section

See gh-29048
This commit is contained in:
heqiang 2022-08-31 22:49:07 +08:00 committed by Stephane Nicoll
parent 0389fcca7e
commit 111a9902ac
1 changed files with 7 additions and 7 deletions

View File

@ -1520,7 +1520,7 @@ programming arrangements as the following listing shows:
Note that there are special considerations for the returned `Publisher` with regards to
Reactive Streams cancellation signals. See the <<tx-prog-operator-cancel>> section under
"Using the TransactionOperator" for more details.
"Using the TransactionalOperator" for more details.
[[transaction-declarative-annotations-method-visibility]]
@ -2474,32 +2474,32 @@ different settings (for example, a different isolation level), you need to creat
two distinct `TransactionTemplate` instances.
[[tx-prog-operator]]
==== Using the `TransactionOperator`
==== Using the `TransactionalOperator`
The `TransactionOperator` follows an operator design that is similar to other reactive
The `TransactionalOperator` follows an operator design that is similar to other reactive
operators. It uses a callback approach (to free application code from having to do the
boilerplate acquisition and release transactional resources) and results in code that is
intention driven, in that your code focuses solely on what you want to do.
NOTE: As the examples that follow show, using the `TransactionOperator` absolutely
NOTE: As the examples that follow show, using the `TransactionalOperator` absolutely
couples you to Spring's transaction infrastructure and APIs. Whether or not programmatic
transaction management is suitable for your development needs is a decision that you have
to make yourself.
Application code that must run in a transactional context and that explicitly uses
the `TransactionOperator` resembles the next example:
the `TransactionalOperator` resembles the next example:
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
.Java
----
public class SimpleService implements Service {
// single TransactionOperator shared amongst all methods in this instance
// single TransactionalOperator shared amongst all methods in this instance
private final TransactionalOperator transactionalOperator;
// use constructor-injection to supply the ReactiveTransactionManager
public SimpleService(ReactiveTransactionManager transactionManager) {
this.transactionOperator = TransactionalOperator.create(transactionManager);
this.transactionalOperator = TransactionalOperator.create(transactionManager);
}
public Mono<Object> someServiceMethod() {