Skip to content
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

Improve documentation on HTTP clients used by EurekaClient. #4242

Merged
merged 2 commits into from
Jan 25, 2024

Conversation

OlgaMaciaszek
Copy link
Collaborator

Fixes gh-4236.

@OlgaMaciaszek
Copy link
Collaborator Author

@Buzzardo please review the changes.

==== EurekaClient with Jersey
==== Underlying HTTP clients

`EurekaClient` uses either `RestTemplate`, `WebClient` or `JerseyClient` under the hood. In order to use the `EurekaClient`, you need to have one of the supported HTTP clients on your classpath.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to:

EurekaClient uses one of RestTemplate, WebClient, or JerseyClient under the hood. To use the EurekaClient, you need to have one of the supported HTTP clients on your classpath.

That usage of "either" isn't, strictly speaking, wrong, but it is about a century out of date. Also, as a general rule, you rarely need "In order" - you can often leave it out and have the same meaning, as here.


`EurekaClient` uses either `RestTemplate`, `WebClient` or `JerseyClient` under the hood. In order to use the `EurekaClient`, you need to have one of the supported HTTP clients on your classpath.

To use `RestTemplate`, add `spring-boot-starter-web` to your dependencies. To use `WebClient`, add `spring-boot-starter-webflux` to your dependencies. If both `RestTemplate` and `WebClient` are on the classpath, when `eureka.client.webclient.enabled` is set to `true`, `WebClient` will be used. Otherwise, `RestTemplate` will be used.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comma before "when" and change both instances of "will be" to "is".

The comma isn't wrong (the sentence works either way), but we aim to remove anything we don't strictly need. The change from "will be" to "is" is in keeping with our practice of sticking with the indefinite present tense (sometimes called the simple present tense), which generally lets us write shorter sentences. Again, you're not wrong, but our conventions do it differently.

Just for reference, here is the Spring Style Guide: https://github.com/spring-io/spring-asciidoctor-backends/blob/main/guides/style-guide.adoc

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @Buzzardo.

@OlgaMaciaszek OlgaMaciaszek merged commit ed9ca44 into main Jan 25, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve documentation on required HTTP client dependencies
2 participants