Пример #1
0
 @Override
 public Isolation getStrategy(final Method targetMethod) {
   Transactional tranAnno = targetMethod.getAnnotation(Transactional.class);
   if (tranAnno == null) {
     return Isolation.DEFAULT; // 默认设置
   }
   return tranAnno.isolation();
 }
Пример #2
0
 @Override
 public Propagation getStrategy(final Method targetMethod) {
   Transactional tranAnno = targetMethod.getAnnotation(Transactional.class);
   if (tranAnno == null) {
     return Propagation.REQUIRED; // 默认设置
   }
   return tranAnno.propagation();
 }