96.Spring Boot JDBC Transaction management example

preview_player
Показать описание
In this video you will learn how to manage transaction in spring boot jdbc.
Your application has actually zero configuration. Spring Boot will detect spring-jdbc on the classpath and MYSQL and will create a DataSource and a JdbcTemplate for you automatically. Because such infrastructure is now available and you have no dedicated configuration, a DataSourceTransactionManager will also be created for you: this is the component that intercepts the @Transactional annotated method (e.g.BankServiceImpl). The BankServiceImpl is detected via classpath scanning.
Below is the GitHub link to download source:
Рекомендации по теме
Комментарии
Автор

Great video, really nails the concept and explains how it is done in Spring Boot.
Before finding this video, i was having issues with the transaction being rolled back - but after adding the "rollbackFor=Exception.class" - all works as expected
@Transactional(isolation = Isolation.READ_COMMITTED, propagation = Propagation.REQUIRED, rollbackFor = Exception.class)
Keep up the good work!

AleksandarT
Автор

Hi,
I've done everything like this video, but my transaction management is not working. Im not able to figure out what mistake I did. Please help.🙏

Bimal_Behera
Автор

Thank you so much for this tutorial, I have question regarding this, is same code work for two phase commit (distributed environment) or do we need to do any other configuration?

venugutala
Автор

How to manage transaction in microservices
?

santoshtidke
Автор

love you bro.. nice one.
I need a code to have a connection for more than one Database. actually, I need to update two tables in one transaction which are in different DBs (One is in Oracle and another is in MSSQL). plz suggest.

rajkumaraddu