From 94a757113d669a28ca107e25bda279d0e25f8fcf Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 23 Jul 2019 08:57:09 +0200 Subject: [PATCH] Document HandlerInterceptor is scanned by @WebMvcTest See gh-17601 --- .../src/main/asciidoc/spring-boot-features.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 5029ecb9d4..f529c6dec7 100644 --- a/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -7379,8 +7379,9 @@ assertThat(json.write(message)) To test whether Spring MVC controllers are working as expected, use the `@WebMvcTest` annotation. `@WebMvcTest` auto-configures the Spring MVC infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`, -`GenericConverter`, `Filter`, `WebMvcConfigurer`, and `HandlerMethodArgumentResolver`. -Regular `@Component` beans are not scanned when using this annotation. +`GenericConverter`, `Filter`, `HandlerInterceptor`, `WebMvcConfigurer`, and +`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 <>.