From spring reference document
Spring recommends only annotating specific classes (and methods of specific classes) with @Transactional annotation, rather than annotating interfaces. Of course, you can put the @Transactional annotation on an interface (or an interface method), but this only works as you would expect if you use an interface-based proxy. The fact that Java annotations are not inherited from interfaces means that if you use proxy classes (proxy-target-class = "true") or an aspect based on weaving (mode = "aspectj"), then transaction settings are not recognized proxy and weave infrastructure, and the object will not be wrapped in a transactional proxy, which will be clearly bad.
Although it is only about interfaces, abstract classes are also considered unsafe.
So, if I have an abstract class
public abstract class BaseService{
and a specific class that extends the class
public class SpecialService extends BaseService{
Now, if I call specialService.updateData() from my controller class, will it be transactional?
nayef source share