Spring 常用 Transaction Annotation

Attribute Name Default Value Possible Values
propagation Propagation.REQUIRED Propagation.REQUIRED Propagation.SUPPORTS
Propagation.MANDATORY
Propagation.REQUIRES_NEW
Propagation.NOT_SUPPORTED
Propagation.NEVER
Propagation.NESTED
isolation  Isolation.DEFAULT
(Default isolation level of the underlying resource)
Isolation.DEFAULT
Isolation.READ_UNCOMMITTED
Isolation.READ_COMMITTED
Isolation.REPEATABLE_READ
Isolation.SERIALIZABLE
timeout TransactionDefinition.TIMEOUT_DEFAULT
(Default transaction timeout in seconds of the
underlying resource)
An integer value larger than zero;
indicates the number in seconds for
transaction timeout
readOnly FALSE FALSE
TRUE
rollbackFor  Exception classes for which transaction will be
rolled back
N/A
rollbackForClassName  Exception class names for which transaction will
be rolled back
N/A
noRollbackFor  Exception classes for which transaction will not
be rolled back
N/A
noRollbackForClassName  Exception class names for which transaction will
not be rolled back
N/A
value  ""(A qualifier value for the specified
transaction)
N/A

排版排不好,详见excel附件

猜你喜欢

转载自wsjjasper.iteye.com/blog/1570448