package com.l7tech.server.util;

import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;

public class UserSwitchedRoutingDataSourceSelector implements MethodInterceptor {
   private final String a;

   public UserSwitchedRoutingDataSourceSelector(String var1) {
      this.a = var1;
   }

   public Object invoke(MethodInvocation var1) throws Throwable {
      try {
         UserSwitchedRoutingDataSource.setDataSourceKey(this.a);
         return var1.proceed();
      } finally {
         UserSwitchedRoutingDataSource.setDataSourceKey(null);
      }
   }
}
