TokenAspect.java 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. //package com.imed.costaccount.common.aop;
  2. //
  3. //import cn.hutool.core.util.StrUtil;
  4. //import com.imed.costaccount.common.token.ThreadLocalToken;
  5. //import com.imed.costaccount.common.util.Result;
  6. //import lombok.extern.slf4j.Slf4j;
  7. //import org.aspectj.lang.ProceedingJoinPoint;
  8. //import org.aspectj.lang.annotation.Around;
  9. //import org.aspectj.lang.annotation.Aspect;
  10. //import org.aspectj.lang.annotation.Pointcut;
  11. //import org.springframework.beans.factory.annotation.Autowired;
  12. //import org.springframework.stereotype.Component;
  13. //
  14. //@Aspect
  15. //@Component
  16. //@Slf4j
  17. //public class TokenAspect {
  18. //
  19. // @Autowired
  20. // private ThreadLocalToken local;
  21. //
  22. // @Pointcut("execution(public * com.imed.costaccount.web.*.*(..)))")
  23. // public void tokenPointCut() {
  24. //
  25. // }
  26. //
  27. // @Around("tokenPointCut()")
  28. // public Object tokenAround(ProceedingJoinPoint point) throws Throwable {
  29. // Result result = (Result) point.proceed();
  30. // String token = local.getToken();
  31. // if (StrUtil.isNotBlank(token)) {
  32. // result.setToken(token);
  33. // local.clear();
  34. // return result;
  35. // }
  36. // return result;
  37. // }
  38. //}