Annotation Type DBProperty


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface DBProperty
    This annotation can be declared on a field in which a property should be injected from a database.
    Author:
    Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String configuration
      The configuration file containing database connection properties.
      String key
      The key to load from the table specified in the configuration properties.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String defaultValue
      The default value to set in case the key does not exist or cannot be loaded.
      boolean failFast
      Flag to fail the configuration process if the key is absent
      int order
      Injection order regarding other annotations.
    • Element Detail

      • configuration

        String configuration
        The configuration file containing database connection properties.
        Returns:
        The configuration file containing database connection properties
      • key

        String key
        The key to load from the table specified in the configuration properties.
        Returns:
        The key to load from the table specified in the configuration properties
      • defaultValue

        String defaultValue
        The default value to set in case the key does not exist or cannot be loaded.
        Returns:
        the default value to set
        Default:
        ""
      • failFast

        boolean failFast
        Flag to fail the configuration process if the key is absent
        Returns:
        true if the configuration process should fail fast if the key is absent
        Default:
        false
      • order

        int order
        Injection order regarding other annotations.
        Returns:
        injection order regarding other annotations
        Default:
        0