Annotation Interface DisableDiscovery


@Inherited @Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface DisableDiscovery
Disables CDI discovery.

If discovery is desired, do not annotate test class with this annotation.

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

When disabling discovery, you are responsible for adding the beans and extensions needed to activate the features you need. You can use the following annotations to do that:

See also the following "core" CDI extensions:

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    By default, if you annotate a class or a method, discovery gets disabled.
  • Element Details

    • value

      boolean value
      By default, if you annotate a class or a method, discovery gets disabled. If you want to override configuration on method to differ from class, you can configure the value to false, effectively enabling discovery.
      Returns:
      whether to disable discovery (true), or enable it (false). If this annotation is not present, discovery is enabled
      Default:
      true