@Transactional annotation is probably the most randomly used annotation in the whole Java development world – and it’s terrifying!
There are many misconception about how & and where to use @Transactional annotations in spring boot application. I came across this awesome tutorial and it is worth reading it.
Common pitalls are:
- Pitfall #1: Redundant @Transactional or JPA calls
- Pitfall #2: @Transactional ignored?
- Pitfall #3: @Transactional(readOnly = true)
- Pitfall #4: Rollbacks
- Pitfall #5: Propagation modes and isolation levels
Read more in