package com.hotent.base.aop;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;

import com.hotent.base.util.ThreadLocalCleanUtil;

/**
 * 异步线程清理线程变量切面
 *
 * @company 广州宏天软件股份有限公司
 * @author zhangxw
 * @email zhangxw@jee-soft.cn
 * @date 2020年11月6日
 */
@Aspect
@Component
public class AsyncThreadCleanAspect{
	
	@Around("@annotation(com.hotent.base.annotation.AsyncThreadClean)")
	public Object threadLocalClean(ProceedingJoinPoint joinPoint) throws Throwable{
		ThreadLocalCleanUtil.cleanAll();
		return joinPoint.proceed();
	}
}
