------- Android training, Java training, and hope to communicate with you! ----------
| Singleton |
There is only one bean instance in the springioc container, and the bean exists as a single instance. |
| Prototype |
Every time a bean is called from the container, a new instance is returned, that is, every time getbean () is called, The xxxbean () operation is executed. |
| Request |
Each HTTP request creates a new bean. This scope applies only to the webapplicationcontext environment. |
| Session |
The same http session shares a bean. This scope applies only to the webapplicationcontext environment. |
| Globalsession |
The same global session shares a bean, which is generally used in the Portlet application environment. This scope applies only to the webapplicationcontext environment. |
Configuration method: Scope = "<scope type>" If the last three scopes are used. configure <listener> <listener-class> Org. springframework. web. context. request. requestcontextlisterner </listener-class> </listener>
------- Android training, Java training, and hope to communicate with you! ----------