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

public @Interface SessionScope

extends Annotation
Annotations
@Target:TYPE, METHOD
@Retention:RUNTIME
@Documented
@Scope:session
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

@SessionScope is a specialization of @Scope for a component whose lifecycle is bound to the current web session.

Specifically, @SessionScope is a composed annotation that acts as a shortcut for @Scope("session") with the default proxyMode set to TARGET_CLASS.

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

Author
Sam Brannen
Since
4.3
See Also
RequestScope, ApplicationScope, org.springframework.context.annotation.Scope, org.springframework.web.context.WebApplicationContext#SCOPE_SESSION, org.springframework.web.context.request.SessionScope, 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