Annotation Type ApplicationScope
@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @Scope("application") public @interface ApplicationScope
@ApplicationScope
is a specialization of@Scope
for a component whose lifecycle is bound to the current web application.Specifically,
@ApplicationScope
is a composed annotation that acts as a shortcut for@Scope("application")
with the defaultproxyMode()
set toTARGET_CLASS
.@ApplicationScope
may be used as a meta-annotation to create custom composed annotations.- Since:
- 4.3
- Author:
- Sam Brannen
- See Also:
RequestScope
,SessionScope
,Scope
,WebApplicationContext.SCOPE_APPLICATION
,ServletContextScope
,Component
,Bean
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description ScopedProxyMode
proxyMode
Alias forScope.proxyMode()
.
Element Detail
proxyMode
@AliasFor(annotation=Scope.class) ScopedProxyMode proxyMode
Alias forScope.proxyMode()
.Defaults to
ScopedProxyMode.TARGET_CLASS
.- Default:
- org.springframework.context.annotation.ScopedProxyMode.TARGET_CLASS