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

Fix some issues in getting-started-dev-services #36474

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions docs/src/main/asciidoc/getting-started-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
:prerequisites-no-graalvm:
include::{includes}/prerequisites.adoc[]

This tutorial builds on what you learned writing xref:{doc-guides}/getting-started.adoc[your first Quarkus application].
This tutorial builds on what you learned writing xref:getting-started.adoc[your first Quarkus application].
You will not need the code from that application, but make sure you understand the concepts.

Check warning on line 31 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'verify' rather than 'make sure' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'verify' rather than 'make sure' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 31, "column": 55}}}, "severity": "WARNING"}

== Solution

Expand Down Expand Up @@ -79,10 +79,10 @@
=== Accepting user input

Let's make the application a bit more interactive.
Open the project in your IDE and navigate to `src/main/java/org/acme/GreetingResource.java'
Open the project in your IDE and navigate to `src/main/java/org/acme/GreetingResource.java`

Check warning on line 82 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using '"click", "select", "browse", or "go to"' rather than 'navigate'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using '\"click\", \"select\", \"browse\", or \"go to\"' rather than 'navigate'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 82, "column": 29}}}, "severity": "INFO"}
Add a query param in the `hello` method.

Check warning on line 83 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'param'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'param'?", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 83, "column": 8}}}, "severity": "WARNING"}
(The `org.jboss.resteasy.reactive.RestQuery` annotation is like the Jakarta REST `@QueryParam`
annotation, except you don't need to duplicate the parameter name.)

Check warning on line 85 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'. Raw Output: {"message": "[Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 85, "column": 25}}}, "severity": "INFO"}

[source, java]
----
Expand Down Expand Up @@ -142,7 +142,7 @@
}
----

The entity makes use of xref:{doc-guides}hibernate-orm-panache.adoc[Panache], a layer on top of Hibernate ORM.
The entity makes use of xref:hibernate-orm-panache.adoc[Panache], a layer on top of Hibernate ORM.
Extending `PanacheEntity` brings in a range of methods for reading, writing, and finding data.
Because all the data access methods are on the `Greeting` entity, rather than on a separate data access class,
this is an example of the active record pattern.
Expand Down Expand Up @@ -199,9 +199,9 @@
}
----

To try it out, visit http://localhost:8080/hello?name=Bloom, and then http://localhost/hello/names.
To try it out, visit http://localhost:8080/hello?name=Bloom, and then http://localhost:8080/hello/names.

You should see the following message: "I've said hello to Bloom".

Check failure on line 204 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsErrors] Use 'you' rather than 'I'. Raw Output: {"message": "[Quarkus.TermsErrors] Use 'you' rather than 'I'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 204, "column": 40}}}, "severity": "ERROR"}

[IMPORTANT]
.a container runtime is required.
Expand All @@ -215,14 +215,14 @@
Reading and writing to the database seems to be working well, but that's a bit unexpected.
Where did a PostgreSQL database come from? You didn't set anything up.

The database is being managed using xref:{docfile}/dev-services.adoc[Dev Services].
The database is being managed using xref:dev-services.adoc[Dev Services].

Check warning on line 218 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 218, "column": 25}}}, "severity": "INFO"}
Dev Services take care of stopping and starting services needed by your application.
Because you
included the `jdbc-postgresql` dependency, the database is a containerised PostgreSQL database.
If you'd added `jdbc-mysql` insead, you would have gotten a containerised MySQL database.
If you'd added `jdbc-mysql` instead, you would have gotten a containerised MySQL database.

If you like, use your container tool to see what containers are running.
For example, if you're using Docker, run `docker ps`, and for podman, run `podman ps`.

Check warning on line 225 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'. Raw Output: {"message": "[Quarkus.TermsSuggestions] Depending on the context, consider using 'by using' or 'that uses' rather than 'using'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 225, "column": 18}}}, "severity": "INFO"}

Check warning on line 225 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.CaseSensitiveTerms] Use 'Podman' rather than 'podman'. Raw Output: {"message": "[Quarkus.CaseSensitiveTerms] Use 'Podman' rather than 'podman'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 225, "column": 58}}}, "severity": "INFO"}

Check warning on line 225 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Spelling] Use correct American English spelling. Did you really mean 'podman'? Raw Output: {"message": "[Quarkus.Spelling] Use correct American English spelling. Did you really mean 'podman'?", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 225, "column": 58}}}, "severity": "WARNING"}
You should see something like the following:

----
Expand All @@ -235,10 +235,10 @@

=== Initialising services

If you play with your code some more, you may notice that sometimes, after making an application change, http://localhost/hello/names doesn't list any names.
If you play with your code some more, you may notice that sometimes, after making an application change, http://localhost:8080/hello/names doesn't list any names.

Check warning on line 238 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses the term. Raw Output: {"message": "[Quarkus.TermsWarnings] Consider using 'might (for possiblity)' or 'can (for ability)' rather than 'may' unless updating existing content that uses the term.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 238, "column": 38}}}, "severity": "WARNING"}
What's going on? By default, in dev mode, with a Dev Services database,
Quarkus configures Hibernate ORM database generation to be `drop-and-create`.
See the xref:{docfile}/hibernate-orm.adoc#quarkus-hibernate-orm_quarkus.hibernate-orm.database-database-related-configuration[Hibernate configuration reference] for more details.
See the xref:hibernate-orm.adoc#quarkus-hibernate-orm_quarkus.hibernate-orm.database-database-related-configuration[Hibernate configuration reference] for more details.
If a code change triggers an application restart, the database tables
will be dropped (deleted) and then re-created.

Expand Down Expand Up @@ -279,10 +279,10 @@
----

This tells Quarkus that you don't want it to start a Dev Service,
because you have your own database. You don't need to worry about starting

Check warning on line 282 in docs/src/main/asciidoc/getting-started-dev-services.adoc

View workflow job for this annotation

GitHub Actions / Linting with Vale

[vale] reported by reviewdog 🐶 [Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'. Raw Output: {"message": "[Quarkus.Fluff] Depending on the context, consider using 'Rewrite the sentence, or use 'must', instead of' rather than 'need to'.", "location": {"path": "docs/src/main/asciidoc/getting-started-dev-services.adoc", "range": {"start": {"line": 282, "column": 42}}}, "severity": "INFO"}
the database, because you're just seeing how to change the configuration.

Visit `http://localhost:8080/hello/names`. Instead of a list of names,
Visit http://localhost:8080/hello/names. Instead of a list of names,
you'll get a red error screen. In the terminal where Quarkus is running.
you'll see the following stack error message:

Expand Down Expand Up @@ -310,7 +310,7 @@

Add a `%prod.`
prefix to the database configuration. This means the configuration
only applies to the xref:{docfile}/config-reference#profiles[prod profile]
only applies to the xref:config-reference.adoc#profiles[prod profile]

The configuration should look like this:

Expand Down Expand Up @@ -341,6 +341,6 @@

== References

* xref:{doc-guides}dev-services.adoc[Dev Services]
* xref:dev-services.adoc[Dev Services]

* xref:{doc-guides}hibernate-orm-panache.adoc[Hibernate ORM with Panache]
* xref:hibernate-orm-panache.adoc[Hibernate ORM with Panache]
Loading