Annotation Interface DisabledInAotMode


@Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented @DisabledIf(value="org.springframework.aot.AotDetector#useGeneratedArtifacts", disabledReason="Disabled in Spring AOT mode") public @interface DisabledInAotMode
@DisabledInAotMode signals that an annotated test class is disabled in Spring AOT (ahead-of-time) mode, which means that the ApplicationContext for the test class will not be processed for AOT optimizations at build time.

If a test class is annotated with @DisabledInAotMode, all other test classes which specify configuration to load the same ApplicationContext must also be annotated with @DisabledInAotMode. Failure to annotate all such test classes will result in a exception, either at build time or run time.

When used with JUnit Jupiter based tests, @DisabledInAotMode also signals that the annotated test class or test method is disabled when running the test suite in Spring AOT mode. When applied at the class level, all test methods within that class will be disabled. In this sense, @DisabledInAotMode has semantics similar to those of JUnit Jupiter's @DisabledInNativeImage annotation.

This annotation may be used as a meta-annotation in order to create a custom composed annotation that inherits the semantics of this annotation.

Since:
6.1
Author:
Sam Brannen
See Also: