Annotation Interface Configuration


@Inherited @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface Configuration
General setting for the test configuration.

If used on a method, the container will be reset regardless of the test lifecycle.

See Also:
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Class-path resources to add as config sources to the synthetic test configuration.
    Configuration profile.
    boolean
    If set to false, the synthetic test configuration is used.
  • Element Details

    • useExisting

      boolean useExisting
      If set to false, the synthetic test configuration is used.

      The synthetic test configuration is expressed with the following:

      If set to true, only the existing (or default) MicroProfile configuration is used as-is and the annotations listed previously are ignored.

      You can use ConfigProviderResolver to define the configuration programmatically before the CDI container starts.

      Returns:
      whether to use existing (or default) configuration
      Default:
      false
    • configSources

      String[] configSources
      Class-path resources to add as config sources to the synthetic test configuration.
      Returns:
      config sources
      Default:
      {}
    • profile

      String profile
      Configuration profile.

      The default profile is 'test'

      Returns:
      profile
      Default:
      "test"