0
点赞
收藏
分享

微信扫一扫

Spring的destroy方法不执行


当使用 init-method 和 destroy-method 的时候,使用 prototype 时 Spring 不会负责销毁容器对象,即 Spring 不会调用 destroy-method 所指定的方法,所以需要去掉 scope 属性,使用默认的 singleton

举报

相关推荐

0 条评论