Does Spring @Transactional attribute work on a private method?

后端 未结 8 2152
耶瑟儿~
耶瑟儿~ 2020-11-22 14:03

If I have a @Transactional -annotation on a private method in a Spring bean, does the annotation have any effect?

If the @Transactional annotation is on

8条回答
  •  自闭症患者
    2020-11-22 14:50

    The answer is no. Please see Spring Reference: Using @Transactional :

    The @Transactional annotation may be placed before an interface definition, a method on an interface, a class definition, or a public method on a class

提交回复
热议问题