Skip to content

Commit 792de8f

Browse files
committed
Add a note regarding Jackson Module usage with Web[Mvc|Flux]Test
Closes spring-projectsgh-10648
1 parent 1830dcf commit 792de8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -6000,6 +6000,9 @@ scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `@Convert
60006000
`Filter`, `WebMvcConfigurer`, and `HandlerMethodArgumentResolver`. Regular `@Component`
60016001
beans are not scanned when using this annotation.
60026002

6003+
TIP: If you need to register extra components such as Jackson `Module`, you can import
6004+
additional configuration classes using `@Import` on your test.
6005+
60036006
Often, `@WebMvcTest` is limited to a single controller and is used in combination with
60046007
`@MockBean` to provide mock implementations for required collaborators.
60056008

@@ -6103,6 +6106,9 @@ infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`,
61036106
`@JsonComponent`, `Converter`, and `WebFluxConfigurer`. Regular `@Component` beans are
61046107
not scanned when the `@WebFluxTest` annotation is used.
61056108

6109+
TIP: If you need to register extra components such as Jackson `Module`, you can import
6110+
additional configuration classes using `@Import` on your test.
6111+
61066112
Often, `@WebFluxTest` is limited to a single controller and used in combination with the
61076113
`@MockBean` annotation to provide mock implementations for required collaborators.
61086114

0 commit comments

Comments
 (0)