Annotation Interface DisableDiscovery
@Inherited
@Retention(RUNTIME)
@Target({TYPE,METHOD})
@Deprecated(since="4.2.0")
public @interface DisableDiscovery
Deprecated.
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:
AddBeanto add CDI beansAddExtensionto add CDI extensionsAddJaxRsa shorthand to add JAX-RS (Jersey)
See also the following "core" CDI extensions:
ServerCdiExtensionoptional if usingAddJaxRsJaxRsCdiExtensionoptional if usingAddJaxRsConfigCdiExtension
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionbooleanDeprecated.By default, if you annotate a class or a method, discovery gets disabled.
-
Element Details
-
value
boolean valueDeprecated.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 tofalse, effectively enabling discovery.- Returns:
- whether to disable discovery (
true), or enable it (false). If this annotation is not present, discovery is enabled
- Default:
true
-