Annotation Interface RequestScope


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @Scope("request") public @interface RequestScope
@RequestScope is a specialization of @Scope for a component whose lifecycle is bound to the current web request.

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

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

Since:
4.3
Author:
Sam Brannen
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    org.springframework.context.annotation.ScopedProxyMode
    Alias for Scope.proxyMode().
  • Element Details

    • proxyMode

      @AliasFor(annotation=org.springframework.context.annotation.Scope.class) org.springframework.context.annotation.ScopedProxyMode proxyMode
      Alias for Scope.proxyMode().

      Defaults to ScopedProxyMode.TARGET_CLASS.

      Default:
      TARGET_CLASS