![]() REQUIRED - Supports a current transaction, create a new one if none exists. These are the transaction propagation behaviours defined by the propagation enum. RuntimeExceptions triggers rollback, and any checked Exceptions do not. The default timeout of the underlying transaction system, or to none if timeouts are not supported. Optional array of names of exception classes that must not cause rollback. Optional array of exception classes that must not cause rollback.Īrray of String class names, which must be derived from Throwable. Optional array of names of exception classes that must cause rollback. Optional array of exception classes that must cause rollback.Īrray of class names. Optional qualifier specifying the transaction manager to be used.Īrray of Class objects, which must be derived from Throwable. The following table from the documentation lists all of them. There are quite a few settings that can be applied to this annotation. For example, “start a brand new read-only transaction when this method is invoked, suspending any existing transaction”. The annotation is metadata that specifies that an interface, class, or method must have transactional semantics. In order to apply transaction management, all you have to do is add the annotation. So, you don’t have to do anything to enable transaction management. because I have spring-data libraries in the classpath, transaction management is enabled by the framework. ![]() We are building a Spring Boot application, so most of the configuration is done for me. ![]() Typically transaction management is enabled using annotation or it could also be done via XML. How To Enable Spring’s Transaction Management
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |