mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-10-09 16:49:36 +00:00
Fix transaction managemement snippet and documentation
Closes gh-36323
This commit is contained in:
+3
-25
@@ -89,34 +89,12 @@ annotation in a `@Configuration` class. See the
|
||||
{spring-framework-api}/transaction/annotation/EnableTransactionManagement.html[javadoc]
|
||||
for full details.
|
||||
|
||||
The following examples show the configuration needed to enable annotation-driven transaction management:
|
||||
The following example show the configuration needed to enable annotation-driven transaction management:
|
||||
|
||||
[tabs]
|
||||
======
|
||||
Java::
|
||||
+
|
||||
[source,java,indent=0,subs="verbatim,quotes",role="primary"]
|
||||
----
|
||||
include-code::AppConfig[]
|
||||
----
|
||||
|
||||
Kotlin::
|
||||
+
|
||||
[source,kotlin,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
----
|
||||
include-code::AppConfig[]
|
||||
----
|
||||
|
||||
XML::
|
||||
+
|
||||
[source,xml,indent=0,subs="verbatim,quotes",role="secondary"]
|
||||
----
|
||||
include-code::annotations-tx[tags=snippet]
|
||||
----
|
||||
======
|
||||
include-code::./AppConfig[tag=snippet,indent=0]
|
||||
|
||||
TIP: In programmatic configuration, the `@EnableTransactionManagement` annotation uses any
|
||||
`PlatformTransactionManager` bean in the context. In XML configuration, you can omit
|
||||
`TransactionManager` bean in the context. In XML configuration, you can omit
|
||||
the `transaction-manager` attribute in the `<tx:annotation-driven/>` tag if the bean
|
||||
name of the `TransactionManager` that you want to wire in has the name `transactionManager`.
|
||||
If the `TransactionManager` bean has any other name, you have to use the
|
||||
|
||||
Reference in New Issue
Block a user