Top Description Methods
org.springframework.web.context.annotation

public @Interface ApplicationScope

extends Annotation
Annotations
@Target:TYPE, METHOD
@Retention:RUNTIME
@Documented
@Scope:application
Imports
java.lang.annotation.Documented, .ElementType, .Retention, .RetentionPolicy, .Target, org.springframework.context.annotation.Scope, .ScopedProxyMode, org.springframework.core.annotation.AliasFor, org.springframework.web.context.WebApplicationContext

@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 default proxyMode set to TARGET_CLASS.

@ApplicationScope may be used as a meta-annotation to create custom composed annotations.

Author
Sam Brannen
Since
4.3
See Also
RequestScope, SessionScope, org.springframework.context.annotation.Scope, org.springframework.web.context.WebApplicationContext#SCOPE_APPLICATION, org.springframework.web.context.support.ServletContextScope, org.springframework.stereotype.Component, org.springframework.context.annotation.Bean

Method Summary

Modifier and TypeMethod and Description
public ScopedProxyMode
Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Method Detail

proxyModeback to summary
public ScopedProxyMode proxyMode()

Alias for Scope#proxyMode.

Defaults to ScopedProxyMode#TARGET_CLASS.

Annotations
@AliasFor
annotation:Scope