Skip to content
Advertisement

Override transactional method

I have method M with @Transactional in service A.

I have service B extends A with overrided method M.

Will be overrided method M still transactional? Or I should add there @Transactional?

Advertisement

Answer

What you are actually asking : is the @Transactional annotation on the method inherited.

Short answer : no. Annotations on methods are never inherited.

Long answer : see this post.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement