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

修复当类的scope为prototype时循环依赖问题依旧存在的bug #76

Open
wants to merge 1 commit into
base: circular-reference-with-proxy-bean
Choose a base branch
from

Conversation

daHDAf
Copy link

@daHDAf daHDAf commented Jun 26, 2024

image
设置scope为prototype
image
循环依赖导致栈溢出

image
原因在于只有当前bean的scope为singleton才会提前暴露,这就无法解决scope为prototype时的循环依赖。

image
所以这里直接让任何bean都可以提前暴露
image
然后在bean创建好了后,删除除了第一级缓存外的所有缓存

@DerekYRC
Copy link
Owner

DerekYRC commented Jul 9, 2024

你好,这个实现参考了spring源码吗?尽量和原生spring的实现方式保持一致

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

Successfully merging this pull request may close these issues.

None yet

2 participants