Skip to content

Commit

Permalink
Document native image limitation of ApplicationContextRunner
Browse files Browse the repository at this point in the history
Closes gh-34007
  • Loading branch information
mhalbritter committed Oct 27, 2023
1 parent 43a3fbf commit 07f7435
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,8 @@ An auto-configuration can be affected by many factors: user configuration (`@Bea
Concretely, each test should create a well defined `ApplicationContext` that represents a combination of those customizations.
`ApplicationContextRunner` provides a great way to achieve that.

WARNING: `ApplicationContextRunner` doesn't work when running the tests in a native image.

`ApplicationContextRunner` is usually defined as a field of the test class to gather the base, common configuration.
The following example makes sure that `MyServiceAutoConfiguration` is always invoked:

Expand Down

0 comments on commit 07f7435

Please sign in to comment.