-1
如果两者都可以在Spring中运行时功能有什么区别?是否有可能在Spring中的原型bean内部保持singleton bean中的原型引用和单引用?
如果两者都可以在Spring中运行时功能有什么区别?是否有可能在Spring中的原型bean内部保持singleton bean中的原型引用和单引用?
答案是肯定的,你可以在单例中连接原型bean,但也有一些缺陷。
这是一个很好的例子。
https://prasanthnath.wordpress.com/2013/03/21/injecting-a-prototype-bean-into-a-singleton-bean/
什么内部原型逆向即辛格尔顿 – user18424
你可以做到这一点。功能之间的区别是 – Avinash
http://stackoverflow.com/questions/16058365/what-is-difference-between-singleton-and-prototype-bean – Avinash