Skip to content

Commit 07f7435

Browse files
committed
Document native image limitation of ApplicationContextRunner
Closes gh-34007
1 parent 43a3fbf commit 07f7435

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spring-boot-project/spring-boot-docs/src/docs/asciidoc/features/developing-auto-configuration.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,8 @@ An auto-configuration can be affected by many factors: user configuration (`@Bea
149149
Concretely, each test should create a well defined `ApplicationContext` that represents a combination of those customizations.
150150
`ApplicationContextRunner` provides a great way to achieve that.
151151

152+
WARNING: `ApplicationContextRunner` doesn't work when running the tests in a native image.
153+
152154
`ApplicationContextRunner` is usually defined as a field of the test class to gather the base, common configuration.
153155
The following example makes sure that `MyServiceAutoConfiguration` is always invoked:
154156

0 commit comments

Comments
 (0)