Check that WebClient is available
This commit reinstanties the isWeBClientPresent() check so that WebTestClientContextCustomizer is only added if a web client is available. See gh-24152
This commit is contained in:
committed by
Stephane Nicoll
parent
b1678ee6ad
commit
f6255cc691
@@ -39,7 +39,7 @@ class WebTestClientContextCustomizerFactory implements ContextCustomizerFactory
|
||||
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() {
|
||||
|
||||
Reference in New Issue
Block a user