-
Notifications
You must be signed in to change notification settings - Fork 41.6k
Editing pass for spring-boot-features.adoc #10797
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
Editing pass for spring-boot-features.adoc #10797
Conversation
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.
Thank you, @Buzzardo. Editing this must have been a huge piece of work. I've commented on various bits and pieces as I've read through your changes. Could you please review those comments?
| and reference your listener(s) using the `org.springframework.context.ApplicationListener` | ||
| If you want those listeners to be registered automatically, regardless of the way the | ||
| application is created, you can add a `META-INF/spring.factories` file to your project | ||
| and reference your listener(s) byusing the `org.springframework.context.ApplicationListener` |
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.
"byusing" -> "by using"
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.
| @@ -311,12 +309,12 @@ TIP: Spring Boot will also register a `CommandLinePropertySource` with the Sprin | |||
| === Using the ApplicationRunner or CommandLineRunner | |||
| If you need to run some specific code once the `SpringApplication` has started, you can | |||
| implement the `ApplicationRunner` or `CommandLineRunner` interfaces. Both interfaces work | |||
| in the same way and offer a single `run` method which will be called just before | |||
| in the same way and offer a single `run` method which, is called just before | |||
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.
"which, is called" -> "which is called"?
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.
I put the comma in the wrong place (it goes before "which"). Thanks.
| `Environment`. You can also supply the JSON as | ||
| `spring.application.json` in a System variable: | ||
| `spring.application.json` in a System variable, as shown in the following example: |
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.
Not your doing, but I think this should be property rather than variable
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.
OK
| If `spring.config.location` contains directories (as opposed to files) they should end | ||
| in `/` (and will be appended with the names generated from `spring.config.name` before | ||
| If `spring.config.location` contains directories (as opposed to files), they should end | ||
| in `/` (and be appended with the names generated from `spring.config.name` before |
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.
The "will" was important here. It'd describing something that will happen that runtime, not something that the user should do in their configuration.
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.
I changed the line to "in / (and, at runtime, be appended with the names generated from spring.config.name before".
The idea behind removing "will" is to be consistent about tense and to avoid making promises. When we need to spell out what happens at compile-time/design-time versus what happens at runtime, we should do so explicitly and pitch "will" in the bin.
| the `SpringApplication` API and therefore take precedence. | ||
|
|
||
| NOTE: If you have specified any files in `spring.config.location`, profile-specific | ||
| variants of those files will not be considered. Use directories in | ||
| variants of those files are not considered. Use directories in | ||
| `spring.config.location` if you also want to also use profile-specific properties. |
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.
Not your doing, but I think one of the "also"s in this sentence could go
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.
Not my doing, but I should have caught it. Oh, well. Fixed now. Thanks.
| in your tests with Mock MVC or REST Assured. It removes the need for Spring REST Docs' | ||
| JUnit rule. | ||
| ==== Auto-configured Spring REST Docs Tests | ||
| You can use The `@AutoConfigureRestDocs` annotation to use Spring REST Docs |
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.
"The" -> "the"
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.
Yes. Thanks. (The perils of rearranging to have an active voice.)
| `ApplicationConfiguration` class for your customizations or one class per domain area | ||
| when it makes sense. The latter approach allows you to enable it in one of your test | ||
| when it makes sense. The latter approach lets you enable it in one of your test |
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.
"test" -> "tests"?
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.
Yes. I missed some other things in that sentence, too. Thanks.
| recommended, but not mandatory, to use the Apache HTTP Client (version 4.3.2 or better). | ||
| If you have that on your classpath, the `TestRestTemplate` responds by configuring | ||
| the client appropriately. If you do use Apache's HTTP client, some additional test-friendly | ||
| features aree enabled: |
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.
"aree" -> "are"
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.
Yup. Thanks.
| the library and any additional dependencies that are typically useful. In a nutshell, | ||
| adding the starter should be enough to start using that library. | ||
| adding the starter should provided everything needed to start using that library. |
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.
"provided" -> "provide"
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.
Yes. Thanks.
|
|
||
| Here is a rule of thumb. Let's assume that you are creating a starter for "acme", name the | ||
| As a rule of thumb, you should name a combined module after the start. For example, |
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.
"start" -> "starter"
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.
Yes. Thanks.
I made it more formal, fixed sentence errors, and added links (or added TODOs for links when I wasn't sure what the link should be).
Andy caught a bunch of stuff for me, and I made the changes. Thanks, Andy.
* gh-10797: Wrap spring-boot-features.adoc at 90 characters Make editorial changes to spring-boot-features.adoc
I made it more formal, fixed sentence errors, and added links (or added TODOs for links when I wasn't sure what the link should be).