Skip to content

Commit

Permalink
Ensure the WebClient to be present before enabling the WebTestClientC…
Browse files Browse the repository at this point in the history
…ontextCustomizer
  • Loading branch information
gesellix committed Nov 13, 2020
1 parent b397032 commit eb9ee3f
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -39,7 +39,7 @@ public ContextCustomizer createContextCustomizer(Class<?> testClass,
List<ContextConfigurationAttributes> configAttributes) {
SpringBootTest springBootTest = TestContextAnnotationUtils.findMergedAnnotation(testClass,
SpringBootTest.class);
return (springBootTest != null) ? new WebTestClientContextCustomizer() : null;
return (springBootTest != null && isWebClientPresent()) ? new WebTestClientContextCustomizer() : null;
}

private boolean isWebClientPresent() {
Expand Down

0 comments on commit eb9ee3f

Please sign in to comment.