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 value> property> // proxy target [ // interceptor name, can Multiple ] Myinterceptor value> list> property> bean>
2) transaction management transaction management Spring AOP is an application, as follows: // Transaction Manager protoyal> // transaction attribute PropAgation_required, readonly prop> < prop key = "load *"> PROPAGATION_REQUIRED, readOnly prop> PROPAGATION_REQUIRED prop> PROPAGATION_REQUIRED prop> PropAgation_required prop> props> profy> bean> // target ref> proty> bean> property> bean> 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.