Annotation Interface IfBuildProperty


@Repeatable(List.class) @Retention(RUNTIME) @Target({METHOD,TYPE,FIELD}) public @interface IfBuildProperty
When applied to a bean class or producer method (or field), the bean will only be enabled if the Quarkus build time property matches the provided value.

By default, the bean is not enabled when the build time property is not defined at all, but this behavior is configurable via the enableIfMissing property.

This annotation is repeatable. A bean will only be enabled if all the conditions defined by the IfBuildProperty annotations are satisfied.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
     
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Name of the build time property to check
    Expected String value of the build time property (specified by name) if the bean is to be enabled
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Determines if the bean is to be enabled when the property name specified by name has not been specified at all
  • Element Details

    • name

      String name
      Name of the build time property to check
    • stringValue

      String stringValue
      Expected String value of the build time property (specified by name) if the bean is to be enabled
    • enableIfMissing

      boolean enableIfMissing
      Determines if the bean is to be enabled when the property name specified by name has not been specified at all
      Default:
      false