Annotation-based transaction management

A, @ Transactional annotation of the source, to the default value when defining attribute

 

 Second, the annotation-based transaction management code implementation

1, bean.xml configuration

 

 

2, service codes embodiment annotation layer configuration:

 

 Wherein, in a class with all methods are transaction management, may be disposed on a separate method;

Guess you like

Origin www.cnblogs.com/wmqiang/p/11621939.html