-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Conversation
@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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, @Buzzardo.
Fixes gh-4236.