Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

foreach和spring aop怎么处理 #353

Open
a1zhangyong opened this issue Apr 2, 2024 · 1 comment
Open

foreach和spring aop怎么处理 #353

a1zhangyong opened this issue Apr 2, 2024 · 1 comment

Comments

@a1zhangyong
Copy link

  1. foreach里面有异步需要挂起的方法, 测试下来目前是有问题的,请问需要怎么解决
  2. spring aop执行的时候报错
    public Object process(ProceedingJoinPoint joinPoint, BizLog[] bizLogs) throws Throwable {
    Context.setCurrent(new Context());
    Object proceedResult = joinPoint.proceed();
    List recordBizLogs = parseBizLog(joinPoint, proceedResult, bizLogs);
    logger.bizLog(recordBizLogs);
    return proceedResult;
    }
@qiaoenxin
Copy link

qiaoenxin commented Apr 24, 2024

这种字节码增强的协程,对使用者的要求比较高。
1,foreach,手动挂起。
2,通过配置,告诉agent要修改spring-aop生成的类。
所以,你直接用虚拟线程就好了。jdk21之前就用kona,21和之后直接用jdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants