Annotation Interface Prototype


@Scope("prototype") @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface Prototype
作者:
TODAY
2018-07-2 20:44:15
  • 可选元素概要

    可选元素
    修饰符和类型
    可选元素
    说明
    boolean
    Is this bean a candidate for getting autowired into some other bean?
    The optional names of a method to call on the bean instance upon closing the application context, for example a close() method on a JDBC DataSource implementation, or a Hibernate SessionFactory object.
    The optional name of a method to call on the bean instance during initialization.
    The value may indicate a suggestion for a logical component name, to be turned into a bean in case of an autodetected component.
  • 元素详细资料

    • value

      @AliasFor(annotation=Component.class) String[] value
      The value may indicate a suggestion for a logical component name, to be turned into a bean in case of an autodetected component.
      返回:
      the suggested component name, if any (or empty String otherwise)
      默认值:
      {}
    • initMethods

      @AliasFor(annotation=Component.class) String[] initMethods
      The optional name of a method to call on the bean instance during initialization. Not commonly used, given that the method may be called programmatically directly within the body of a Bean-annotated method.

      The default value is "", indicating no init method to be called.

      另请参阅:
      默认值:
      {}
    • destroyMethod

      @AliasFor(annotation=Component.class) String destroyMethod
      The optional names of a method to call on the bean instance upon closing the application context, for example a close() method on a JDBC DataSource implementation, or a Hibernate SessionFactory object. The method must have no arguments but may throw any exception.

      Note: Only invoked on beans whose lifecycle is under the full control of the factory, which is always the case for singletons but not guaranteed for any other scope.

      另请参阅:
      默认值:
      "(inferred)"
    • autowireCandidate

      @AliasFor(annotation=Component.class) boolean autowireCandidate
      Is this bean a candidate for getting autowired into some other bean?

      Default is true; set this to false for internal delegates that are not meant to get in the way of beans of the same type in other places.

      从以下版本开始:
      4.0
      默认值:
      true