-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Update @RestClientTest to work with WebClient #8404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hello, Does anyone has any update on this one? I was about to migrate my code to Using Thanks |
The Spring Framework team have declined the issue that was blocking this one. Their recommendation is to use |
Thanks for the insight @wilkinsona |
This comment was marked as off-topic.
This comment was marked as off-topic.
@RestClientTest
to work with WebClient
This comment was marked as outdated.
This comment was marked as outdated.
Sorry if I'm having trouble navigating this. This wasn't a question as much as a feature request. The current issue concludes with : won't support a test slice for webclient since the spring mock Web server doesn't support webclient I'm here to ask for a test slice that uses okhttp mock server instead. This might be worthy of its own GitHub issue, but as you saw, I tried that already. |
Uh oh!
There was an error while loading. Please reload this page.
If WebFlux is on the classpath it would be cool if
MockRestServiceServer
could be configured with aWebClient
instred of aRestTemplate
.Since both will be on the classpath (
RestTemplate
is in a shared module), the annotation should probably have an attribute to indicate a preference. Not sure that both can be used at the same time though.An enum will be better but I can't find good names for the values (
REST_TEMPLATE
is pretty gross).This currently requires some changes in Spring Framework, I've created an issue
The text was updated successfully, but these errors were encountered: