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

Polish documentation #42445

Closed

Conversation

ngocnhan-tran1996
Copy link
Contributor

No description provided.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Sep 25, 2024
@@ -165,7 +165,7 @@ spring:
[[data.sql.jdbc-template]]
== Using JdbcTemplate

Spring's `JdbcTemplate` and `NamedParameterJdbcTemplate` classes are auto-configured, and you can `@Autowire` them directly into your own beans, as shown in the following example:
Copy link
Contributor

@mhalbritter mhalbritter Sep 25, 2024

Choose a reason for hiding this comment

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

This is intentional. While the annotation is called @Autowired, we made a verb out of it, @Autowire.

Team: I think that's somewhat confusing. Maybe it's besser to change this to "and you can autowire them ..." ?

Copy link
Member

@wilkinsona wilkinsona Sep 25, 2024

Choose a reason for hiding this comment

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

+1 for changing to "autowire". The Framework docs use "autowire" as a verb and we should follow suit, particularly as the example that follows doesn't even use @Autowired as it does not need to do so.

@@ -528,7 +528,7 @@ If you want to make sure that each context has a separate embedded database, you
[[data.sql.r2dbc.using-database-client]]
=== Using DatabaseClient

A `DatabaseClient` bean is auto-configured, and you can `@Autowire` it directly into your own beans, as shown in the following example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member

Choose a reason for hiding this comment

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

+1 here too.

@@ -176,7 +176,7 @@ If you need to start a full running server, we recommend that you use random por
If you use `@SpringBootTest(webEnvironment=WebEnvironment.RANDOM_PORT)`, an available port is picked at random each time your test runs.

The `@LocalServerPort` annotation can be used to xref:how-to:webserver.adoc#howto.webserver.discover-port[inject the actual port used] into your test.
For convenience, tests that need to make REST calls to the started server can additionally `@Autowire` a {url-spring-framework-docs}/testing/webtestclient.html[`WebTestClient`], which resolves relative links to the running server and comes with a dedicated API for verifying responses, as shown in the following example:
Copy link
Contributor

Choose a reason for hiding this comment

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

Same as above.

Copy link
Member

Choose a reason for hiding this comment

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

The example needs @Autowired (so that the test context framework's parameter resolver kicks in) but I'm still in favor of using "autowire" here as well.

@mhalbritter mhalbritter added type: documentation A documentation update for: team-attention An issue we'd like other members of the team to review for: merge-with-amendments Needs some changes when we merge and removed status: waiting-for-triage An issue we've not yet triaged labels Sep 25, 2024
@mhalbritter mhalbritter added this to the 3.2.x milestone Sep 25, 2024
@mhalbritter mhalbritter self-assigned this Sep 26, 2024
@mhalbritter mhalbritter changed the title Update document Polish documentation Sep 26, 2024
mhalbritter pushed a commit that referenced this pull request Sep 26, 2024
@mhalbritter
Copy link
Contributor

Thanks @ngocnhan-tran1996 !

@mhalbritter mhalbritter modified the milestones: 3.2.x, 3.2.11 Sep 26, 2024
@mhalbritter mhalbritter removed for: team-attention An issue we'd like other members of the team to review for: merge-with-amendments Needs some changes when we merge labels Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: documentation A documentation update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants