We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
jdk版本 1.8.0_102 写个了程序验证了下使用@value的对象是不会被回收的,若是多例的情况下,就会造成很多对象无法回收。 是否需要将bean改成弱引用,或若不需要onchange的功能,有开关设置不存储 for (String key : keys) { SpringValue springValue = new SpringValue(key, value.value(), bean, beanName, field, false); springValueRegistry.register(key, springValue); logger.debug("Monitoring {}", springValue); }
The text was updated successfully, but these errors were encountered:
spring value目前是会用强引用hold住bean的,不过一般Spring中bean不会频繁创建的,所以之前有考虑过改为弱引用,只是觉得没有很大必要,不过后续这个确实可以做一下。
目前是有开关来控制是否需要自动更新spring中注入的值得,参见3.2.2 Spring Placeholder的使用
Sorry, something went wrong.
@shanjingheng
PR #1676 已经修复该问题
Successfully merging a pull request may close this issue.
jdk版本 1.8.0_102
写个了程序验证了下使用@value的对象是不会被回收的,若是多例的情况下,就会造成很多对象无法回收。 是否需要将bean改成弱引用,或若不需要onchange的功能,有开关设置不存储
for (String key : keys) {
SpringValue springValue = new SpringValue(key, value.value(), bean, beanName, field, false);
springValueRegistry.register(key, springValue);
logger.debug("Monitoring {}", springValue);
}
The text was updated successfully, but these errors were encountered: