@Transactional annotation in Spring

Spring provides support for both programmatic and declarative transactions .
1 Programmatic Transactions
With programmatic transactions, transaction management code needs to be explicitly written so as to commit when everything is successful and rolling back if anything goes wrong. The transaction management code is tightly bound to the business logic in this case.

2 Declarative Transactions
Declarative transactions separates transaction management code from the business logic. Spring supports declarative transactions using transaction advice (using AOP) via XML configuration in the spring context or with @Transactional annotation.

Java||Spring-Boot|| Micro services Application developer|| INDIA

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How to Fix Paladins Crash on Windows 10

Tool Based Behavioral Code Analysis

StudioAssistastant — A Rails App for the Working Producer

Best courses on Coursera

DevFest Italy: CFP concluded … successfully!

What the CRUD

How to restrict S3 content with AWS Cloudfront signed URLs using Nodejs

Reporting quality improvements in agile teams

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sanjay Singh

Sanjay Singh

Java||Spring-Boot|| Micro services Application developer|| INDIA

More from Medium

My First JS Project (Part 2)!

Sorting lower bounds and O(n)-time sorting

Get started with deno (from NodeJS or not…)

How object and class attributes work ?