Commit 94a75711 authored by Stephane Nicoll's avatar Stephane Nicoll

Document HandlerInterceptor is scanned by @WebMvcTest

See gh-17601
parent 6580d394
...@@ -7379,8 +7379,9 @@ assertThat(json.write(message)) ...@@ -7379,8 +7379,9 @@ assertThat(json.write(message))
To test whether Spring MVC controllers are working as expected, use the `@WebMvcTest` To test whether Spring MVC controllers are working as expected, use the `@WebMvcTest`
annotation. `@WebMvcTest` auto-configures the Spring MVC infrastructure and limits annotation. `@WebMvcTest` auto-configures the Spring MVC infrastructure and limits
scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`,
`GenericConverter`, `Filter`, `WebMvcConfigurer`, and `HandlerMethodArgumentResolver`. `GenericConverter`, `Filter`, `HandlerInterceptor`, `WebMvcConfigurer`, and
Regular `@Component` beans are not scanned when using this annotation. `HandlerMethodArgumentResolver`. Regular `@Component` beans are not scanned when using
this annotation.
TIP: A list of the auto-configuration settings that are enabled by `@WebMvcTest` can be TIP: A list of the auto-configuration settings that are enabled by `@WebMvcTest` can be
<<appendix.adoc#test-auto-configuration,found in the appendix>>. <<appendix.adoc#test-auto-configuration,found in the appendix>>.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment