关于Scope=prototyp的设置下,close没有显示销毁

刚发现Scope在默认singleton单例下测试可以显示出自定义的销毁提示,但是在prototyp下就没有显示了,表示不李姐,求解释下为什么呢,可以销毁的嘛?

In contrast to the other scopes, Spring does not manage the complete lifecycle of a prototype bean. The container instantiates, configures, and otherwise assembles a prototype object and hands it to the client, with no further record of that prototype instance. Thus, although initialization lifecycle callback methods are called on all objects regardless of scope, in the case of prototypes, configured destruction lifecycle callbacks are not called. The client code must clean up prototype-scoped objects and release expensive resources that the prototype beans hold. To get the Spring container to release resources held by prototype-scoped beans, try using a custom bean post-processor, which holds a reference to beans that need to be cleaned up.

单例是容器帮你创建的,可以控制销毁,多例的是在用的时候每次创建,容器没法控制,只能自生自灭

spring ioc容器会管理所有的bean 的创建,但是只会对单列bean做完整的生命周期管理。多例bean 在 spring 创建后,不会进行管理。
我也没试过: 通过@Bean 指定销毁方法 应该是有用的