What is considered the best practice in placing the @Transactional annotation? Should I annotate the interface method or the implementation?
What is considered the best practice in placing the @Transactional annotation? Should I annotate
Share
Good question. I’ve always put it in the implementation. Perhaps because it is an implementation detail, rather than an abstraction.
You may want different implementations to have different transactional behaviours.
El Guapo noted that, in addition to that, there are more issues that can arise from putting on on the interface, related to the proxying strategy.