初识Spring——Spring对象生命周期

在这里插入图片描述
在scope="singleton"的前提下(不然destroy不执行),从静态代码块到destroy,先静态方法,再非静态方法,再构造方法,setter方法,init,最后到destroy。

发布了54 篇原创文章 · 获赞 1 · 访问量 841

猜你喜欢

转载自blog.csdn.net/weixin_44764207/article/details/104450797