Skip to content

Commit

Permalink
Fix some issues in getting-started-dev-services:
Browse files Browse the repository at this point in the history
- Add missing port 8080
- Fix small error in text format
- Fix links to docs that result in a 404
  • Loading branch information
leo-bogastry committed Oct 13, 2023
1 parent e337149 commit 0050e56
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions docs/src/main/asciidoc/getting-started-dev-services.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ Once the application is up, visit http://localhost:8080/hello. It should show a
=== 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"}
Expand Down Expand Up @@ -142,7 +142,7 @@ public class Greeting extends PanacheEntity {
}
----

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:{doc-guides}/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,7 +199,7 @@ public String names() {
}
----

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"}

Expand All @@ -215,11 +215,11 @@ you will start seeing failures in the Quarkus logs at this point.
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:{doc-guides}/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"}
Expand All @@ -235,10 +235,10 @@ Quarkus will automatically stop the container when your application stops.

=== 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:{doc-guides}/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 @@ -282,7 +282,7 @@ 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 @@ but have it *only* used in production, so you could still use dev services the r

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:{doc-guides}/config-reference.adoc#profiles[prod profile]

The configuration should look like this:

Expand Down Expand Up @@ -341,6 +341,6 @@ a 'real' database, without you having to configure anything.

== References

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

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

0 comments on commit 0050e56

Please sign in to comment.