diff --git a/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/annotations.adoc b/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/annotations.adoc index b94b778a6e5..50b6c5e7bb8 100644 --- a/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/annotations.adoc +++ b/framework-docs/modules/ROOT/pages/data-access/transaction/declarative/annotations.adoc @@ -8,7 +8,7 @@ danger of undue coupling, because code that is meant to be used transactionally almost always deployed that way anyway. NOTE: The standard `jakarta.transaction.Transactional` annotation is also supported as -a drop-in replacement to Spring's own annotation. Please refer to the JTA documentation +a drop-in replacement for Spring's own annotation. Please refer to the JTA documentation for more details. The ease-of-use afforded by the use of the `@Transactional` annotation is best @@ -89,7 +89,7 @@ annotation in a `@Configuration` class. See the {spring-framework-api}/transaction/annotation/EnableTransactionManagement.html[javadoc] for full details. -The following example show the configuration needed to enable annotation-driven transaction management: +The following example shows the configuration needed to enable annotation-driven transaction management: include-code::./AppConfig[tag=snippet,indent=0] @@ -203,8 +203,10 @@ on an interface, a class definition, or a method on a class. However, the mere p of the `@Transactional` annotation is not enough to activate the transactional behavior. The `@Transactional` annotation is merely metadata that can be consumed by corresponding runtime infrastructure which uses that metadata to configure the appropriate beans with -transactional behavior. In the preceding example, the `` element -switches on actual transaction management at runtime. +transactional behavior. In the preceding examples that use programmatic configuration, +the `@EnableTransactionManagement` annotation switches on actual transaction management +at runtime. Whereas, in the preceding example that uses XML configuration, the +`` element switches on actual transaction management at runtime. TIP: The Spring team recommends that you annotate methods of concrete classes with the `@Transactional` annotation, rather than relying on annotated methods in interfaces,