There is a section in the white paper related to bean areas:
Basically, they define the following:
singleton ( ) bean IoC Spring.
bean .
bean HTTP-; HTTP- bean, bean. - Spring ApplicationContext.
bean HTTP. - Spring ApplicationContext.
globalSession bean HTTP. . - Spring ApplicationContext.
bean ServletContext. - Spring ApplicationContext.
WebSocket bean WebSocket. - Spring ApplicationContext.
, Spring 3.0 , , , :
Spring 3.0, , . . SimpleThreadScope. , . " ".
, , :
Application scope :
Spring AppPreferences bean appPreferences bean . apppreferences bean ServletContext, ServletContext.
Spring singleton bean:
a Spring singleton bean, : singleton per ServletContext, Spring "ApplicationContext" ( ), , , ServletContext
, XML:
<bean id="apps" class="com.App" scope="application"/>
:
@ApplicationScope
@Component
public class App {
}