Annotation Interface DisableDiscovery
Whether discovery is automated or disabled. If discovery is desired, do not annotate test
class with this annotation.
When discovery is enabled, the whole classpath is scanned for bean archives (jar files containing
META-INF/beans.xml
) and all beans and extensions are added automatically.
When discovery is disabled, CDI would only contain the CDI implementation itself and beans and extensions added
through annotations AddBean
and
AddExtension
If discovery is disabled on class level and desired on method level,
the value can be set to false
.
-
Optional Element Summary
Modifier and TypeOptional ElementDescriptionboolean
By default if you annotate a class or a method, discovery gets disabled.
-
Element Details
-
value
boolean valueBy 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
-