本文整理匯總了Java中org.aspectj.lang.reflect.MethodSignature.getMethod方法的典型用法代碼示例。如果您正苦於以下問題:Java MethodSignature.getMethod方法的具體用法?Java MethodSignature.getMethod怎麽用?Java MethodSignature.getMethod使用的例子?那麽恭喜您, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.aspectj.lang.reflect.MethodSignature的用法示例。
在下文中一共展示了MethodSignature.getMethod方法的20個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於我們的係統推薦出更棒的Java代碼示例。
示例1: invoke
點讚 5
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Override
public Object invoke(String transactionGroupId, ProceedingJoinPoint point) throws Throwable {
MethodSignature signature = (MethodSignature) point.getSignature();
Method method = signature.getMethod();
Class> clazz = point.getTarget().getClass();
Object[] args = point.getArgs();
Method thisMethod = clazz.getMethod(method.getName(), method.getParameterTypes());
final String compensationId = CompensationLocal.getInstance().getCompensationId();
final TxTransaction txTransaction = method.getAnnotation(TxTransaction.class);
final int waitMaxTime = txTransaction.waitMaxTime();
final PropagationEnum propagation = txTransaction.propagation();
TransactionInvocation invocation = new TransactionInvocation(clazz, thisMethod.getName(), args, method.getParameterTypes());
TxTransactionInfo info = new TxTransactionInfo(invocation,transactionGroupId,compensationId,waitMaxTime,propagation);
final Class c = txTransactionFactoryService.factoryOf(info);
final TxTransactionHandler txTransactionHandler =
(TxTransactionHandler) SpringBeanUtils.getInstance().getBean(c);
return txTransactionHandler.handler(point, info);
}
開發者ID:yu199195,項目名稱:happylifeplat-transaction,代碼行數:24,
示例2: before
點讚 3
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Around("execution(org.springframework.web.servlet.ModelAndView org.gra4j.dataMigration.controller..*.*(..)) "
+ " and @annotation(org.springframework.web.bind.annotation.RequestMapping)")
public Object before(ProceedingJoinPoint pjp) throws Throwable {
// 從切點上獲取目標方法
MethodSignature methodSignature = (MethodSignature) pjp.getSignature();
Method method = methodSignature.getMethod();
// 若目標方法忽略了安全性檢查,則直接調用目標方法
if (method.isAnnotationPresent(UnCheck.class))
return pjp.proceed();
if (StringUtils.isEmpty(tokenName))
tokenName = DEFAULT_TOKEN_NAME;
HttpServletRequest request = WebContext.getRequest();
HttpServletResponse response = WebContext.getResponse();
String token = tokenManager.createToken(
((SecurityContextImpl) request.getSession()
.getAttribute("SPRING_SECURITY_CONTEXT"))
.getAuthentication()
.getName());
response.addHeader(tokenName,token);
return pjp.proceed();
}
開發者ID:finefuture,項目名稱:data-migration,代碼行數:25,
示例3: execute
點讚 3
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
/**
* 接收到客戶端請求時執行
*
* @param pjp
* @return
* @throws Throwable
*/
@Around("controllerAspect()")
public Object execute(ProceedingJoinPoint pjp) throws Throwable {
// 從切點上獲取目標方法
MethodSignature methodSignature = (MethodSignature) pjp.getSignature();
Method method = methodSignature.getMethod();
/**
* 驗證Token
*/
if (method.isAnnotationPresent(Token.class)) {
// 從 request header 中獲取當前 token
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
String token = request.getHeader(DEFAULT_TOKEN_NAME);
if (StringUtils.isEmpty(token)) {
throw new TokenException("客戶端X-Token參數不能為空,且從Header中傳入,如果沒有登錄,請先登錄獲取Token");
}
// 檢查 token 有效性
if (!tokenManager.checkToken(token)) {
String message = String.format("Token [%s] 非法", token);
throw new TokenException(message);
}
}
// 調用目標方法
return pjp.proceed();
}
開發者ID:melonlee,項目名稱:LazyREST,代碼行數:33,
示例4: isLocalProceeder
點讚 3
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
/**
* @param method
* @return true
if the given method has the same signature as
* the currently aspectJ extension-overridden method
*/
static boolean isLocalProceeder(Method method)
{
if (!ajLocalProceedingJoinPoints.get().isEmpty())
{
ProceedingContext proceedingCotext = ajLocalProceedingJoinPoints.get().peek();
MethodSignature ms = (MethodSignature) proceedingCotext.proceedingJoinPoint.getSignature();
Method jpMethod = ms.getMethod();
return jpMethod.getName().endsWith(method.getName()) && Arrays.equals(jpMethod.getParameterTypes(),
method.getParameterTypes());
}
else
{
return false;
}
}
開發者ID:Alfresco,項目名稱:alfresco-repository,代碼行數:21,
示例5: interceptor
點讚 3
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Around("aspect()&&@annotation(anno)")
public Object interceptor(ProceedingJoinPoint invocation, CacheClear anno)
throws Throwable {
MethodSignature signature = (MethodSignature) invocation.getSignature();
Method method = signature.getMethod();
Class>[] parameterTypes = method.getParameterTypes();
Object[] arguments = invocation.getArgs();
String key = "";
if (StringUtils.isNotBlank(anno.key())) {
key = getKey(anno, anno.key(), CacheScope.application,
parameterTypes, arguments);
cacheAPI.remove(key);
} else if (StringUtils.isNotBlank(anno.pre())) {
key = getKey(anno, anno.pre(), CacheScope.application,
parameterTypes, arguments);
cacheAPI.removeByPre(key);
} else if (anno.keys().length > 1) {
for (String tmp : anno.keys()) {
tmp = getKey(anno, tmp, CacheScope.application, parameterTypes,
arguments);
cacheAPI.removeByPre(tmp);
}
}
return invocation.proceed();
}
開發者ID:wxiaoqi,項目名稱:ace-cache,代碼行數:26,
示例6: beforeTrans
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
public void beforeTrans(JoinPoint point) {
Signature signature = point.getSignature();
MethodSignature methodSignature = (MethodSignature) signature;
Method method = methodSignature.getMethod();
// 獲取目標類
Class> target = point.getTarget().getClass();
Method targetMethod = null;
try {
targetMethod = target.getMethod(method.getName(), method.getParameterTypes());
} catch (NoSuchMethodException e) {
e.printStackTrace();
}
// 根據目標類方法中的注解,選擇數據源
if (targetMethod != null) {
Transactional transactional = targetMethod.getAnnotation(Transactional.class);
if (transactional != null) {
SpecifyDS specifyDSCls = target.getAnnotation(SpecifyDS.class);
SpecifyDS specifyDS = targetMethod.getAnnotation(SpecifyDS.class);
if (specifyDS != null) {
DataSourceHolder.setDataSource(specifyDS.value());
} else if (specifyDSCls != null) {
DataSourceHolder.setDataSource(specifyDSCls.value());
} else {
DataSourceHolder.setDataSource(defaultTransDb);
}
}
}
}
開發者ID:xiachuanshou,項目名稱:shop-manager,代碼行數:29,
示例7: invoke
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
public Object invoke(ProceedingJoinPoint pjp) throws Throwable {
boolean profilerSwitch = ProfilerSwitch.getInstance().isOpenProfilerTree();
if (!profilerSwitch) {
return pjp.proceed();
}
MethodSignature methodSignature = (MethodSignature) pjp.getSignature();
String clazzName = pjp.getTarget().toString();
Method method = methodSignature.getMethod();
String methodName = this.getClassAndMethodName(clazzName, method);
if (null == methodName) {
return pjp.proceed();
}
try {
if (Profiler.getEntry() == null) {
Profiler.start(methodName);
} else {
Profiler.enter(methodName);
}
return pjp.proceed();
} catch (Throwable e) {
warnLog.warn("profiler " + methodName + " error");
throw e;
} finally {
Profiler.release();
//當root entry為狀態為release的時候,打印信息,並做reset操作
Profiler.Entry rootEntry = Profiler.getEntry();
if (rootEntry != null) {
if (rootEntry.isReleased()) {
long duration = rootEntry.getDuration();
if (duration > ProfilerSwitch.getInstance().getInvokeTimeout()) {
profilerLogger.info("\n" + Profiler.dump() + "\n");
metricsLogger.info("\n" + Profiler.metrics() + "\n");
}
Profiler.reset();
}
}
}
}
開發者ID:minotaursu,項目名稱:profilerAop,代碼行數:39,
示例8: begin
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
public MythTransaction begin(ProceedingJoinPoint point) {
LogUtil.debug(LOGGER, () -> "開始執行Myth分布式事務!start");
MythTransaction mythTransaction = getCurrentTransaction();
if (Objects.isNull(mythTransaction)) {
MethodSignature signature = (MethodSignature) point.getSignature();
Method method = signature.getMethod();
Class> clazz = point.getTarget().getClass();
mythTransaction = new MythTransaction();
mythTransaction.setStatus(MythStatusEnum.BEGIN.getCode());
mythTransaction.setRole(MythRoleEnum.START.getCode());
mythTransaction.setTargetClass(clazz.getName());
mythTransaction.setTargetMethod(method.getName());
}
//保存當前事務信息
coordinatorCommand.execute(new CoordinatorAction(CoordinatorActionEnum.SAVE, mythTransaction));
//當前事務保存到ThreadLocal
CURRENT.set(mythTransaction);
//設置tcc事務上下文,這個類會傳遞給遠端
MythTransactionContext context = new MythTransactionContext();
//設置事務id
context.setTransId(mythTransaction.getTransId());
//設置為發起者角色
context.setRole(MythRoleEnum.START.getCode());
TransactionContextLocal.getInstance().set(context);
return mythTransaction;
}
開發者ID:yu199195,項目名稱:myth,代碼行數:37,
示例9: retry
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Around("@annotation(com.wise.core.aop.annotation.RetriableTransaction)")
public Object retry(ProceedingJoinPoint pjp) throws Throwable {
MethodSignature signature = (MethodSignature) pjp.getSignature();
Method method = signature.getMethod();
RetriableTransaction annotation = method.getAnnotation(RetriableTransaction.class);
int maxAttempts = annotation.maxRetries();
int attemptCount = 0;
List> exceptions = Arrays.asList(annotation.retryFor());
Throwable failure = null;
TransactionStatus currentTransactionStatus = null;
String businessName = pjp.getTarget().toString();
businessName = businessName.substring(0, businessName.lastIndexOf("@")) + "." + method.getName();
do {
attemptCount++;
try {
DefaultTransactionDefinition transactionDefinition = new DefaultTransactionDefinition();
transactionDefinition.setPropagationBehavior(TransactionDefinition.PROPAGATION_REQUIRES_NEW);
currentTransactionStatus = transactionManager.getTransaction(transactionDefinition);
Object returnValue = pjp.proceed();
transactionManager.commit(currentTransactionStatus);
return returnValue;
} catch (Throwable t) {
if (!exceptions.contains(t.getClass())) {
throw t;
}
if (currentTransactionStatus != null && !currentTransactionStatus.isCompleted()) {
transactionManager.rollback(currentTransactionStatus);
failure = t;
}
LOGGER.debug("事務重試:["+businessName+":"+attemptCount+"/"+maxAttempts+"]");
}
} while (attemptCount < maxAttempts);
LOGGER.debug("事務重試:["+businessName+":已達最大重試次數]");
throw failure;
}
示例10: getControllerMethodDescriptionInfo
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
/**
* 獲取注解中對方法的描述信息 用於Controller層注解
*
* @param joinPoint 切點
* @return discription
*/
public static String getControllerMethodDescriptionInfo(JoinPoint joinPoint) {
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
SystemControllerLog controllerLog = method
.getAnnotation(SystemControllerLog.class);
String discription = controllerLog.description();
return discription;
}
開發者ID:ranji1221,項目名稱:lemcloud,代碼行數:15,
示例11: saveSysLog
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Before("logPointCut()")
public void saveSysLog(JoinPoint joinPoint) {
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
SysLogEntity sysLog = new SysLogEntity();
SysLog syslog = method.getAnnotation(SysLog.class);
if(syslog != null){
//注解上的描述
sysLog.setOperation(syslog.value());
}
//請求的方法名
String className = joinPoint.getTarget().getClass().getName();
String methodName = signature.getName();
sysLog.setMethod(className + "." + methodName + "()");
//請求的參數
Object[] args = joinPoint.getArgs();
String params = new Gson().toJson(args[0]);
sysLog.setParams(params);
//獲取request
HttpServletRequest request = HttpContextUtils.getHttpServletRequest();
//設置IP地址
sysLog.setIp(IPUtils.getIpAddr(request));
//用戶名
String username = ((SysUserEntity) SecurityUtils.getSubject().getPrincipal()).getUsername();
sysLog.setUsername(username);
sysLog.setCreateDate(new Date());
//保存係統日誌
sysLogService.save(sysLog);
}
開發者ID:zhaoqicheng,項目名稱:renren-fast,代碼行數:36,
示例12: prefsMethod
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
private Object prefsMethod(final ProceedingJoinPoint joinPoint) throws Throwable {
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
Prefs prefs = method.getAnnotation(Prefs.class);
Object result = null;
if (prefs!=null) {
String key = prefs.key();
result = joinPoint.proceed();
String type = ((MethodSignature) joinPoint.getSignature()).getReturnType().toString();
if (!"void".equalsIgnoreCase(type)) {
String className = ((MethodSignature) joinPoint.getSignature()).getReturnType().getCanonicalName();
AppPrefs appPrefs = AppPrefs.get(Utils.getContext());
if ("int".equals(className) || "java.lang.Integer".equals(className)) {
appPrefs.putInt(key, (Integer) result);
} else if ("boolean".equals(className) || "java.lang.Boolean".equals(className)) {
appPrefs.putBoolean(key,(Boolean) result);
} else if ("float".equals(className) || "java.lang.Float".equals(className)) {
appPrefs.putFloat(key,(Float) result);
} else if ("long".equals(className) || "java.lang.Long".equals(className)) {
appPrefs.putLong(key,(Long) result);
} else if ("java.lang.String".equals(className)) {
appPrefs.putString(key,(String) result);
} else {
appPrefs.putObject(key,result);
}
}
} else {
// 不影響原來的流程
result = joinPoint.proceed();
}
return result;
}
開發者ID:fengzhizi715,項目名稱:SAF-AOP,代碼行數:38,
示例13: getAnnotation
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
private LimitIPRequestAnnotation getAnnotation(JoinPoint joinPoint) {
Signature signature = joinPoint.getSignature();
MethodSignature methodSignature = (MethodSignature) signature;
Method method = methodSignature.getMethod();
if (method != null) {
return method.getAnnotation(LimitIPRequestAnnotation.class);
}
return null;
}
開發者ID:numsg,項目名稱:spring-boot-seed,代碼行數:11,
示例14: doBeforeController
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
/**
* 前置通知
*/
@Before("log()")
public void doBeforeController(JoinPoint joinPoint) {
MethodSignature signature = (MethodSignature) joinPoint.getSignature();
Method method = signature.getMethod();
Action action = method.getAnnotation(Action.class);
System.out.println("action名稱 " + action.value()); // ⑤
}
開發者ID:longjiazuo,項目名稱:springBoot-project,代碼行數:11,
示例15: before
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Around("controllerMethodPointcut()")
public Object before(ProceedingJoinPoint pjp) {
long beginTime = System.currentTimeMillis();
MethodSignature signature = (MethodSignature) pjp.getSignature();
Method method = signature.getMethod(); //獲取被攔截的方法
String methodName = method.getName(); //獲取被攔截的方法名
logger.info("請求開始,方法:{}", methodName);
Object result = null;
Object[] args = pjp.getArgs();
for(Object arg : args){
logger.info(arg.toString());
}
try {
result = pjp.proceed();
} catch (Throwable e) {
logger.info("exception: ", e);
}
long costMs = System.currentTimeMillis() - beginTime;
logger.info("{}請求結束,耗時:{}ms", methodName, costMs);
return result;
}
開發者ID:hutou-workhouse,項目名稱:miscroServiceHello,代碼行數:28,
示例16: doAround
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Around("execution(* *..controller..*.*(..))")
public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
// 獲取request
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) requestAttributes;
HttpServletRequest request = servletRequestAttributes.getRequest();
UpmsLog upmsLog = new UpmsLog();
// 從注解中獲取操作名稱、獲取響應結果
Object result = pjp.proceed();
Signature signature = pjp.getSignature();
MethodSignature methodSignature = (MethodSignature) signature;
Method method = methodSignature.getMethod();
if (method.isAnnotationPresent(ApiOperation.class)) {
ApiOperation log = method.getAnnotation(ApiOperation.class);
upmsLog.setDescription(log.value());
}
if (method.isAnnotationPresent(RequiresPermissions.class)) {
RequiresPermissions requiresPermissions = method.getAnnotation(RequiresPermissions.class);
String[] permissions = requiresPermissions.value();
if (permissions.length > 0) {
upmsLog.setPermissions(permissions[0]);
}
}
endTime = System.currentTimeMillis();
LOGGER.debug("doAround>>>result={},耗時:{}", result, endTime - startTime);
upmsLog.setBasePath(RequestUtil.getBasePath(request));
upmsLog.setIp(RequestUtil.getIpAddr(request));
upmsLog.setMethod(request.getMethod());
if ("GET".equalsIgnoreCase(request.getMethod())) {
upmsLog.setParameter(request.getQueryString());
} else {
upmsLog.setParameter(ObjectUtils.toString(request.getParameterMap()));
}
upmsLog.setResult(JSON.toJSONString(result));
upmsLog.setSpendTime((int) (endTime - startTime));
upmsLog.setStartTime(startTime);
upmsLog.setUri(request.getRequestURI());
upmsLog.setUrl(ObjectUtils.toString(request.getRequestURL()));
upmsLog.setUserAgent(request.getHeader("User-Agent"));
upmsLog.setUsername(ObjectUtils.toString(request.getUserPrincipal()));
upmsApiService.insertUpmsLogSelective(upmsLog);
return result;
}
開發者ID:ChangyiHuang,項目名稱:shuzheng,代碼行數:46,
示例17: getMethodByClassAndName
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
/**
* 根據類和方法名得到方法
*/
private Method getMethodByClassAndName(ProceedingJoinPoint joinPoint) {
Signature signature = joinPoint.getSignature();
MethodSignature methodSignature = (MethodSignature) signature;
return methodSignature.getMethod();
}
開發者ID:wxz1211,項目名稱:dooo,代碼行數:9,
示例18: doAround
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
@Around("execution(* *..controller..*.*(..))")
public Object doAround(ProceedingJoinPoint pjp) throws Throwable {
// 獲取request
RequestAttributes requestAttributes = RequestContextHolder.getRequestAttributes();
ServletRequestAttributes servletRequestAttributes = (ServletRequestAttributes) requestAttributes;
HttpServletRequest request = servletRequestAttributes.getRequest();
SysLog log=new SysLog();
// 從注解中獲取操作名稱、獲取響應結果
Object result = pjp.proceed();
Signature signature = pjp.getSignature();
MethodSignature methodSignature = (MethodSignature) signature;
Method method = methodSignature.getMethod();
log.setTitle("未知");
if (method.isAnnotationPresent(ApiOperation.class)) {
ApiOperation logA = method.getAnnotation(ApiOperation.class);
log.setTitle(logA.value());
}
//if (method.isAnnotationPresent(RequiresPermissions.class)) {
//RequiresPermissions requiresPermissions = method.getAnnotation(RequiresPermissions.class);
//String[] permissions = requiresPermissions.value();
//if (permissions.length > 0) {
//upmsLog.setPermissions(permissions[0]);
//}
//}
LogUtils.saveLog(request,log);
endTime = System.currentTimeMillis();
_log.debug("doAround>>>result={},耗時:{}", result, endTime - startTime);
//upmsLog.setBasePath(RequestUtil.getBasePath(request));
//upmsLog.setIp(RequestUtil.getIpAddr(request));
//upmsLog.setMethod(request.getMethod());
//if (request.getMethod().equalsIgnoreCase("GET")) {
//upmsLog.setParameter(request.getQueryString());
//} else {
//upmsLog.setParameter(ObjectUtils.toString(request.getParameterMap()));
//}
//upmsLog.setLogId(StringUtil.guid());
//upmsLog.setResult(ObjectUtils.toString(result));
//upmsLog.setSpendTime((int) (endTime - startTime));
//upmsLog.setStartTime(startTime);
//upmsLog.setUri(request.getRequestURI());
//upmsLog.setUrl(ObjectUtils.toString(request.getRequestURL()));
//upmsLog.setUserAgent(request.getHeader("User-Agent"));
//upmsLog.setUsername(ObjectUtils.toString(request.getUserPrincipal()));
//upmsApiService.insertUpmsLogSelective(upmsLog);
return result;
}
開發者ID:egojit8,項目名稱:easyweb,代碼行數:50,
示例19: getMethod
點讚 2
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
private static Method getMethod(ProceedingJoinPoint pjp, Object object) {
MethodSignature signature = (MethodSignature) pjp.getSignature();
Method method = signature.getMethod();
return ReflectionUtils
.findMethod(object.getClass(), method.getName(), method.getParameterTypes());
}
開發者ID:opentracing-contrib,項目名稱:java-spring-cloud,代碼行數:7,
示例20: registerParticipant
點讚 1
import org.aspectj.lang.reflect.MethodSignature; //導入方法依賴的package包/類
/**
* 獲取調用接口的協調方法並封裝
*
* @param point 切點
*/
private void registerParticipant(ProceedingJoinPoint point, String transId) throws NoSuchMethodException {
MethodSignature signature = (MethodSignature) point.getSignature();
Method method = signature.getMethod();
Class> clazz = point.getTarget().getClass();
Object[] args = point.getArgs();
final Tcc tcc = method.getAnnotation(Tcc.class);
//獲取協調方法
String confirmMethodName = tcc.confirmMethod();
String cancelMethodName = tcc.cancelMethod();
//設置模式
final TccPatternEnum pattern = tcc.pattern();
tccTransactionManager.getCurrentTransaction().setPattern(pattern.getCode());
TccInvocation confirmInvocation = null;
if (StringUtils.isNoneBlank(confirmMethodName)) {
confirmInvocation = new TccInvocation(clazz,
confirmMethodName, method.getParameterTypes(), args);
}
TccInvocation cancelInvocation = null;
if (StringUtils.isNoneBlank(cancelMethodName)) {
cancelInvocation = new TccInvocation(clazz,
cancelMethodName,
method.getParameterTypes(), args);
}
//封裝調用點
final Participant participant = new Participant(
transId,
confirmInvocation,
cancelInvocation);
tccTransactionManager.enlistParticipant(participant);
}
開發者ID:yu199195,項目名稱:happylifeplat-tcc,代碼行數:51,
注:本文中的org.aspectj.lang.reflect.MethodSignature.getMethod方法示例整理自Github/MSDocs等源碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。