-
Notifications
You must be signed in to change notification settings - Fork 942
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
mirrorCache内存泄露 #1599
Comments
java.lang.ClassCastException ? 给一下日志或者重现代码 |
首先感谢您的回复,以下是一个简单的复现代码,当NutConf.USE_MIRROR_CACHE=true时无问题,但是NutConf.USE_MIRROR_CACHE=false时,最后一行出现类型转换异常。 |
Nutz似乎识别不出来List放的是Student,而是把它当做一个LinkedHashMap,所以出现java.lang.ClassCastException: java.util.LinkedHashMap cannot be cast to Student |
哦, json报错, 这个没想到 |
请问Nutz会修复这个漏洞吗?如果没有修复,可能mirrorCache带来的内存泄露没有办法解决。除此之外,想问一下,为什么关闭mirrorCache会影响到Json的序列化,关闭mirrorCache还会影响到其他工具吗? |
您好,在org.nutz.lang包下有一个Mirror类,它有一个静态的成员变量mirrorCache,用于缓存Type-Mirror的映射,应用上线后mirrorCache会逐渐增大,如果长期不重启应用,mirrorCache甚至达到了1个GB,我通过NutConf.USE_MIRROR_CACHE=false禁用了mirrorCache,但是之后却报java.lang.ClassCastException异常,但是只要不禁用mirrorCache就没有问题,所以想请教一下,正确禁用mirrorCache的姿势是什么?我们是SpingBoot应用。
The text was updated successfully, but these errors were encountered: