mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-09-17 12:09:16 +00:00
Previously, if multiple WebHandler beans were present, the auto-config for WebTestClient fail to identify a suitable candidate as it expects to only have such a bean. This commit updates the logic to look for a well-known bean name that WebFlux uses, and clarify the exception message to state that a bean with a given name is expected to be found. The exception message has been further refined to mention that, if such a bean is not present, then a MockMVc-compatible ApplicationContext should be available (i.e. WebApplicationContext). Closes gh-47617