v0.9.63
-
Support for transactions through the
sqlClient.transaction
method:- If using an IOC framework, encapsulate the transaction management capabilities of the IOC framework.
For example, when using
jimmer-spring-starter
, you don't need to do any work;sqlClient.transaction
will automatically utilize Spring's transaction management capabilities. - If not using any IOC framework, Jimmer provides a lightweight transaction propagation implementation.
- Lightweight transaction propagation mechanism implementation
- Lightweight transaction propagation mechanism test cases
Therefore, whether the user uses an IOC framework and its transaction management mechanism or not, they can usesqlClient.transaction
to handle transactions.
To further unify the usage scenarios of using an IOC framework and not using an IOC framework, Jimmer provides compile-time AOP aspect functionality. Please refer to @Tx. Try using this annotation on classes or methods, and the helpful error messages will guide you step-by-step to use it correctly.
- If using an IOC framework, encapsulate the transaction management capabilities of the IOC framework.