春のリファレンスマニュアルは言う:
Springシングルトンの範囲は、「コンテナーごとおよびBeanごと」として最もよく説明されます。
このコードスニペットを検討してください。
ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml")
MyBean myobj=(MyBean)context.getBean("myBean"); //myBean is of singleton scope.
MyBean myobj1=(MyBean)context.getBean("myBean");
per containerつまり、context.getBean("myBean");2回実行すると、同じBeanが返されます。つまりmyobj==myobj1ですtrue。
しかし、上記のステートメントからのper beanインはどういう意味ですか?per container and per bean