Skip to content

Add programmatic configuration tabs in the transactional refdoc#36323

Open
jisub-dev wants to merge 1 commit intospring-projects:mainfrom
jisub-dev:docs/transaction-java-config
Open

Add programmatic configuration tabs in the transactional refdoc#36323
jisub-dev wants to merge 1 commit intospring-projects:mainfrom
jisub-dev:docs/transaction-java-config

Conversation

@jisub-dev
Copy link

Description

Adds Java Config example alongside existing XML configuration in the @Transactional
annotations section.

Changes:

  • Added Java Config tab showing @EnableTransactionManagement setup
  • Kept existing XML configuration in a separate tab
  • Updated TIP section to explain both approaches

This allows users to choose between modern Java Config and traditional XML
configuration.

Closes #34093

Closes spring-projectsgh-34093

Signed-off-by: jisub-dev <kimjiseob1209@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Feb 13, 2026
@sbrannen sbrannen added the type: documentation A documentation task label Feb 13, 2026
Copy link
Contributor

@sdeleuze sdeleuze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That a good start, please take in account my comments.

Also, there are more samples in this section where a similar update would make sense, could you please handle them as well?

In XML configuration, the `<tx:annotation-driven/>` tag provides similar convenience:
The following examples show the configuration needed to enable annotation-driven transaction management:

[tabs]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We we modify code samples, we try to extract them to proper .java, .kt and .xml files, leveraging code inclusion Asciidoctor capabilities. You will fine similar commits referenced in #35446.

Could you please do the same here and also add a Kotlin sample?

`transactionManager`. If the `TransactionManager` bean that you want to dependency-inject
has any other name, you have to use the `transaction-manager` attribute, as in the
preceding example.
TIP: In Java configuration, the `@EnableTransactionManagement` annotation uses any
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use "programmatic configuration" instead of "Java configuration" or "Javaconfig" as we try to make the documentation equally relevant for Java and Kotlin developers.

@sdeleuze sdeleuze added in: data Issues in data modules (jdbc, orm, oxm, tx) and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Feb 15, 2026
@sdeleuze sdeleuze added this to the 7.0.x milestone Feb 15, 2026
@sdeleuze sdeleuze changed the title Transaction docs: add Java Config tab for @Transactional Add programmatic configuration tabs in the transactional refdoc Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: data Issues in data modules (jdbc, orm, oxm, tx) type: documentation A documentation task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use Java config code snippets in transaction management section

4 participants