Annotation Interface BindToRegistry


@Retention(RUNTIME) @Documented @Target({TYPE,FIELD,METHOD}) public @interface BindToRegistry
Used for binding a bean to the registry. This annotation is not supported with camel-spring or camel-spring-boot as they have their own set of annotations for registering beans in spring bean registry. Instead, this annotation is intended for Camel standalone such as camel-main or camel-quarkus or similar runtimes. If no name is specified then the bean will have its name auto computed based on the class name, field name, or method name where the annotation is configured.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to perform bean post-processing (dependency injection) on the bean
    The optional name of a method to call on the bean instance during destruction.
    The optional name of a method to call on the bean instance during initialization.
    boolean
    Whether to create the bean instance lazy (on-demand) instead of creating eager.
    The name of the bean
  • Element Details

    • value

      String value
      The name of the bean
      Default:
      ""
    • beanPostProcess

      boolean beanPostProcess
      Whether to perform bean post-processing (dependency injection) on the bean
      Default:
      false
    • lazy

      boolean lazy
      Whether to create the bean instance lazy (on-demand) instead of creating eager. Using lazy can be useful when you only need to create beans if they are explicit in-use. NOTE: lazy does not support init or destroy methods.
      Default:
      false
    • initMethod

      String initMethod
      The optional name of a method to call on the bean instance during initialization. If no destroy method has been configured, then Camel will auto-detect as follows: If the bean is Service then start method is used.
      Default:
      ""
    • destroyMethod

      String destroyMethod
      The optional name of a method to call on the bean instance during destruction. If no destroy method has been configured, then Camel will auto-detect as follows: If the bean is Service then stop method is used. If the bean is Closeable then close method is used.
      Default:
      ""