spring自定义注解+扫描

事务注解是怎么发挥作用的。

1、首先自定义一个注解类,public @interface MyComponent。

2、TxAdviceBeanDefinitionParser

3、实现MethodInterceptor接口,进行方法拦截。比如TransactionInterceptor。

猜你喜欢

转载自1181731633.iteye.com/blog/2413576