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

修改用户时,日志保存逻辑中抛出StackOverFlow错误 #609

Closed
liveForExperience opened this issue Mar 7, 2021 · 1 comment
Closed

Comments

@liveForExperience
Copy link

版本

v2.4

环境

本地/线上

复现步骤

  • 新建若干菜单,然后修改用户信息,响应StackOverFlow错误信息。

问题描述

  • LogAspect.logAround()里执行LogServiceImpl.save()方法的jointPoint.getArgs()时,获取的方法参数内容过长(我打印了参数内容,非常多roles、menus和users之间的嵌套),导致getParameter里的JSONUtil.toJsonStr(argList)抛出爆栈错误。
  • 同时因为LogServiceImpl.save()抛出异常,而curTimelogAround()里已经被提前remove(),导致Log log = new Log("ERROR",System.currentTimeMillis() - currentTime.get());会有NPE异常。建议将remove()放在后面。

辛苦了

@liveForExperience
Copy link
Author

目前我是将getParameter()的逻辑前提到了joinPoint.proceed()之前,暂时解决了这个问题。

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

1 participant