-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
初始化与销毁方法中,只避免销毁方法执行两次而初始化方法没有相关的判断 #63
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
DisposableBeanAdapter#destroy() 会通过判断避免 bean 继承自 DisposableBean ,且自定方法与 DisposableBean 方法同名导致销毁方法方法执行两次,代码如下
而 AbstractAutowireCapableBeanFactory#invokeInitMethods() 中缺少类似判断,会导致初始化方法执行两次,代码如下
在查看spring-framework 5.3.x 源码后可以发现源码是做了相关的判断的,如下
The text was updated successfully, but these errors were encountered: