This link: https://www.quora.com/When-should-Spring-Boot-methods-use-the-Transactional-annotation
Explain clearly what's @Transactional doing, but I still don't understand when should Spring Boot methods use this annotation:
For example:
I have this method:
void addPerson () {// code that calls the DAO layer}
My method will work well without the @Transactional annotation then why i should add this annotation.
More precisely (in spring boot) what's the difference between:
@Transactional void addPerson () {// code that calls the DAO layer}
and
void addPerson () {// code that calls the DAO layer}
Or does Spring boot add automatically this annotation so we don't need to add it to our services