-
Notifications
You must be signed in to change notification settings - Fork 38.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document @DisabledInAotMode & @[Enabled|Disabled]InNativeImage in re…
- Loading branch information
Showing
5 changed files
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 20 additions & 0 deletions
20
.../pages/testing/annotations/integration-spring/annotation-disabledinaotmode.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
[[spring-testing-annotation-disabledinaotmode]] | ||
= `@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 an | ||
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. | ||
|
||
For details on AOT support specific to integration tests, see | ||
xref:testing/testcontext-framework/aot.adoc[Ahead of Time Support for Tests]. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters