Package org.apache.camel
Annotation 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 ElementsModifier and TypeOptional ElementDescriptionboolean
Whether to perform bean post-processing (dependency injection) on the beanThe 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 valueThe name of the bean- Default:
""
-
beanPostProcess
boolean beanPostProcessWhether to perform bean post-processing (dependency injection) on the bean- Default:
false
-
lazy
boolean lazyWhether 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 initMethodThe 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 isService
then start method is used.- Default:
""
-
destroyMethod
String destroyMethodThe 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 isService
then stop method is used. If the bean isCloseable
then close method is used.- Default:
""
-