Skip to content

Update @RestClientTest to work with WebClient #8404

Closed
@snicoll

Description

@snicoll

If WebFlux is on the classpath it would be cool if MockRestServiceServer could be configured with a WebClientinstred of a RestTemplate.

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.

@RestClientTest(useWebClient=true)

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: declinedA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions