Spring容器创建Bean的步骤:
1.Create the bean instance via constructor or factory method.
2.Set the values and bean references to bean properties.3.Call initialization callback methods.
4.Bean is ready for use.
5.Upon container shutdown, call destruction callback methods.
小译:
1. 通过构造器或工厂方法创建一个Bean实例
2. 设置Bean的属性值与依赖项
3. 回调initialization()
4. 可以使用Bean了
5. 在容器关闭之前,回调destruction ()
Bean scopes available in Spring
Spring中的Bean的范畴
Singleton Single bean instance per container, shared throughout the IoC container.
Prototype New bean instance created per request.
Request Web application contexts only: Creates a bean instance per HTTP request.
Session Web application contexts only: Creates a bean instance per HTTP session.
GlobalSession Web portlet only: Creates a bean instance per Global HTTP session.
Thread* Creates a bean instance per thread. Similar to request scope.
大意明确,暂不译....