Spring AOP and Transaction Management Mechanism Overview

xiaoxiao2021-03-05  24

Now Spring's AOP and transaction management mechanisms are flooded, and I can't help but record a little relevant knowledge, and check back:

1) AOP most is that we use the org.springframework.aop.framework.ProxyFactoryBean follows: // Proxy interface com.hongsoft.test.dao.mydao // proxy target // interceptor name, can Multiple Myinterceptor

2) transaction management transaction management Spring AOP is an application, as follows: // Transaction Manager // transaction attribute PropAgation_required, readonly < prop key = "load *"> PROPAGATION_REQUIRED, readOnly PROPAGATION_REQUIRED PROPAGATION_REQUIRED PropAgation_required // target can be seen, specified After the transaction manager and transaction properties, it is also very simple to specify the interceptor method in front of our AOP, so it is very simple to use AOP to transaction.

转载请注明原文地址:https://www.9cbs.com/read-35191.html

New Post(0)