Skip to content

Commit b1399db

Browse files
committed
Add a warning about webDriver scope to the docs
Update the reference documentation with a warning about the `webDriver` scope that we create. Closes gh-13093
1 parent 0d35af1 commit b1399db

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6657,6 +6657,10 @@ that the driver exits after each test and that a new instance is injected. If yo
66576657
not want this behavior, you can add `@Scope("singleton")` to your `WebDriver` `@Bean`
66586658
definition.
66596659

6660+
WARNING: The `webDriver` scope created by Spring Boot will replace any user defined scope
6661+
of the same name. If you define your own `webDriver` scope you may find it stops working
6662+
when you use `@WebMvcTest`.
6663+
66606664
TIP: Sometimes writing Spring MVC tests is not enough; Spring Boot can help you run
66616665
<<boot-features-testing-spring-boot-applications-testing-with-running-server,
66626666
full end-to-end tests with an actual server>>.

0 commit comments

Comments
 (0)