现在的情况是在AService(spring创建)中 开启了一个线程,该线程通过线程池(spring创建)执行execute,线程中执行了BService(spring创建)的逻辑 事务都配成required,方法知道下来会在一个事务里么?
学习是最好的投资!
PROPAGATION_REQUIREDIf there is no current transaction, create a new transaction. If there is already a transaction, add it to this transaction.
I remember that Spring’s transactions are implemented through ThreadLocal, so AService and BService will not be in the same transaction
PROPAGATION_REQUIRED
If there is no current transaction, create a new transaction. If there is already a transaction, add it to this transaction.
I remember that Spring’s transactions are implemented through ThreadLocal, so AService and BService will not be in the same transaction