Annotation Type Properties


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface Properties
    This annotation can be declared on a field of type Properties in which all properties from a given properties file should be injected.
    Author:
    Mahmoud Ben Hassine (mahmoud.benhassine@icloud.com)
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      String value
      The properties file name.
    • Optional Element Summary

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

      • value

        String value
        The properties file name.
        Returns:
        The properties file name
      • defaultValue

        String defaultValue
        The default properties file to load in case the specified properties file does not exist or cannot be loaded.
        Returns:
        the default properties file to load
        Default:
        ""
      • failFast

        boolean failFast
        Flag to fail the configuration process if the properties file is absent or cannot be loaded.
        Returns:
        true if the configuration process should fail fast if the properties file is absent or cannot be loaded
        Default:
        false
      • order

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