Basically, if you comment on a class using @Transactional , all methods will be transactional. If you do not, you can annotate @Transactional only with the methods you want. In addition, you can specify different attributes for each method, for example isolation , propagation , timeout , ...
Also, take a look at this question, this is a possible duplicate: Hibernate transaction annotations in source - difference between class and method usage level?
source share