Annotation Interface Configurer


@Retention(RUNTIME) @Documented @Target(TYPE) public @interface Configurer
Marks a class as a candidate for build-time code generation of a PropertyConfigurer implementation by the camel-package-maven-plugin.

At build time, the Camel Maven plugin scans for types annotated with @Configurer and generates a companion *Configurer class that sets properties directly via setters, avoiding reflection at runtime. The generated class implements PropertyConfigurer and is registered in META-INF/services/org/apache/camel/configurer/ so that ConfigurerResolver can locate it by name. This pattern is used pervasively for Component, Endpoint, and EIP model classes to keep configuration-path performance constant regardless of the number of properties.

Set bootstrap() to true for types that are configured only during startup; the generated configurer is then eligible for memory reclamation via ConfigurerStrategy.clearBootstrapConfigurers() after the context has started.

Since:
3.3
See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether this configurer is only used during bootstrap
    boolean
    Whether this configurer should include extended configurer methods.
    boolean
    Whether to let the Camel compiler plugin to generate java source code for fast configuration.
    boolean
    Whether to only include fields that are have @Metadata annotations.
  • Element Details

    • generateConfigurer

      boolean generateConfigurer
      Whether to let the Camel compiler plugin to generate java source code for fast configuration.
      Default:
      true
    • extended

      boolean extended
      Whether this configurer should include extended configurer methods. For example API based components would require this.
      Default:
      false
    • bootstrap

      boolean bootstrap
      Whether this configurer is only used during bootstrap
      Default:
      false
    • metadataOnly

      boolean metadataOnly
      Whether to only include fields that are have @Metadata annotations.
      Default:
      false