Annotation Interface Configuration


@Target(TYPE) @Retention(RUNTIME) @Documented public @interface Configuration

This annotation is to mark an interface to contain configuration data.

The configuration interface is resolved with a portion of application's persistent configuration identified by configuration path.

This configuration annotation is ignored on all nested objects.

The terms configuration interface, configuration key, configuration path, persistent configuration, resolve, and others are used here as defined in the Jakarta Config specification.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The configuration path identifies where the configuration relevant for the annotated configuration class is found in a given application's persistent configuration.
  • Element Details

    • path

      String path
      The configuration path identifies where the configuration relevant for the annotated configuration class is found in a given application's persistent configuration.

      The configuration path uses the dot symbol as a separator.

      For instance, if the persistent configuration contains

        my.configuration.user=tester
      the configuration path for the configuration portion user=tester would be my.configuration.

      Returns:
      a String representation of a configuration path.
      Default:
      ""