Polish contribution

Closes gh-11143
pull/11151/merge
Stephane Nicoll 7 years ago
parent d9828a0aaa
commit 1620ac42b3

@ -6017,9 +6017,9 @@ A list of the auto-configuration that is enabled by `@JsonTest` can be
==== Auto-configured Spring MVC Tests
To test Spring MVC controllers are working as expected, you can 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.
scanned beans to `@Controller`, `@ControllerAdvice`, `@JsonComponent`, `Converter`,
`GenericConverter`, `Filter`, `WebMvcConfigurer`, and `HandlerMethodArgumentResolver`.
Regular `@Component` beans are not scanned when using this annotation.
TIP: If you need to register extra components such as Jackson `Module`, you can import
additional configuration classes using `@Import` on your test.
@ -6124,8 +6124,8 @@ A list of the auto-configuration settings that are enabled by `@WebMvcTest` can
To test that Spring WebFlux controllers are working as expected, you can use the
`@WebFluxTest` annotation. `@WebFluxTest` auto-configures the Spring WebFlux
infrastructure and limits scanned beans to `@Controller`, `@ControllerAdvice`,
`@JsonComponent`, `Converter`, `GenericConverter`, and `WebFluxConfigurer`. Regular `@Component` beans are
not scanned when the `@WebFluxTest` annotation is used.
`@JsonComponent`, `Converter`, `GenericConverter`, and `WebFluxConfigurer`. Regular
`@Component` beans are not scanned when the `@WebFluxTest` annotation is used.
TIP: If you need to register extra components such as Jackson `Module`, you can import
additional configuration classes using `@Import` on your test.

@ -43,9 +43,9 @@ import org.springframework.test.web.reactive.server.WebTestClient;
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to WebFlux tests (i.e. {@code @Controller},
* {@code @ControllerAdvice}, {@code @JsonComponent}, {@code Converter}/{@code GenericConverter}, and
* {@code WebFluxConfigurer} beans but not {@code @Component}, {@code @Service} or
* {@code @Repository} beans).
* {@code @ControllerAdvice}, {@code @JsonComponent},
* {@code Converter}/{@code GenericConverter}, and {@code WebFluxConfigurer} beans but not
* {@code @Component}, {@code @Service} or {@code @Repository} beans).
* <p>
* By default, tests annotated with {@code @WebFluxTest} will also auto-configure a
* {@link WebTestClient}. For more fine-grained control of WebTestClient the

@ -43,9 +43,10 @@ import org.springframework.test.web.servlet.MockMvc;
* <p>
* Using this annotation will disable full auto-configuration and instead apply only
* configuration relevant to MVC tests (i.e. {@code @Controller},
* {@code @ControllerAdvice}, {@code @JsonComponent}, {@code Converter}/{@code GenericConverter}, {@code Filter},
* {@code WebMvcConfigurer} and {@code HandlerMethodArgumentResolver} beans but not
* {@code @Component}, {@code @Service} or {@code @Repository} beans).
* {@code @ControllerAdvice}, {@code @JsonComponent},
* {@code Converter}/{@code GenericConverter}, {@code Filter}, {@code WebMvcConfigurer}
* and {@code HandlerMethodArgumentResolver} beans but not {@code @Component},
* {@code @Service} or {@code @Repository} beans).
* <p>
* By default, tests annotated with {@code @WebMvcTest} will also auto-configure Spring
* Security and {@link MockMvc} (include support for HtmlUnit WebClient and Selenium

Loading…
Cancel
Save