Skip to content

Commit 41a72b0

Browse files
committed
Some additional refinements
1 parent a121a77 commit 41a72b0

7 files changed

Lines changed: 56 additions & 66 deletions

File tree

documentation/modules/ROOT/pages/01_setup.adoc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,14 @@ Alternatively on Windows you can also try https://chocolatey.org/[Chocolatey] wh
6969
[.console-input]
7070
[source,bash,subs="+macros,+attributes"]
7171
----
72-
curl -s "https://get.sdkman.io" | bash
73-
source "$HOME/.sdkman/bin/sdkman-init.sh"
74-
.
75-
sdk install java
76-
sdk install maven
77-
sdk install quarkus
78-
sdk install java 21.0.3-tem
79-
sdk install jbang
72+
curl -s "https://get.sdkman.io" | bash
73+
source "$HOME/.sdkman/bin/sdkman-init.sh"
74+
75+
sdk install java
76+
sdk install maven
77+
sdk install quarkus
78+
sdk install java 21.0.3-tem
79+
sdk install jbang
8080
----
8181
=====
8282
--

documentation/modules/ROOT/pages/02_basics.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
====
99
1010
Maven::
11-
+
11+
+
1212
--
1313
[.console-input]
1414
[source,bash,subs="+macros,+attributes"]
@@ -20,11 +20,11 @@ cd {project-name}
2020
Quarkus CLI::
2121
+
2222
--
23-
The quarkus CLI tool lets you create projects, manage extensions and do essential dev, build and deploy commands using the underlying project build tool in a simplified way.
23+
The quarkus CLI tool lets you create projects, manage extensions and do essential dev, build and deploy commands using the underlying project build tool in a simplified way.
2424
2525
Follow these instructions to install Quarkus CLI: https://quarkus.io/guides/cli-tooling
2626
27-
Then create the application:
27+
Then create the application:
2828
[.console-input]
2929
[source,bash,subs="+macros,+attributes"]
3030
----
@@ -49,7 +49,7 @@ Or else if you're a CLI person, you can run a `curl` command like:
4949
[.console-input]
5050
[source,bash]
5151
----
52-
curl localhost:8080/hello
52+
curl -w '\n' localhost:8080/hello
5353
----
5454

5555
[.console-output]
@@ -83,7 +83,7 @@ You can run the test in your IDE or by running the following:
8383
[tabs%sync]
8484
====
8585
Maven::
86-
+
86+
+
8787
--
8888
[.console-input]
8989
[source,bash,subs="+macros,+attributes"]
@@ -132,7 +132,7 @@ Let's start the _Live Coding_ mode by using the `dev` command. You probably won'
132132
[tabs%sync]
133133
====
134134
Maven::
135-
+
135+
+
136136
--
137137
[.console-input]
138138
[source,bash,subs="+macros,+attributes"]
@@ -152,7 +152,7 @@ quarkus dev
152152
--
153153
====
154154

155-
NOTE: By default Quarkus uses 'localhost' for the dev mode host setting. If you are working in a remote development environment, you may need to set the host to 0.0.0.0 by appending `-D"quarkus.http.host=0.0.0.0"` to the above command.
155+
NOTE: By default Quarkus uses 'localhost' for the dev mode host setting. If you are working in a remote development environment, you may need to set the host to 0.0.0.0 by appending `-D"quarkus.http.host=0.0.0.0"` to the above command.
156156

157157
== Dev UI
158158

@@ -182,6 +182,6 @@ Press `r` and the tests will start running. You should see the status change dow
182182
All 1 test is passing (0 skipped), 1 test was run in 11705ms. Tests completed at 16:02:32.
183183
----
184184

185-
TIP: If you don’t want to have continuous testing enabled, you can change this by adding `quarkus.test.continuous-testing=disabled` to your `src/main/resources/application.properties`.
185+
TIP: If you don’t want to have continuous testing enabled, you can change this by adding `quarkus.test.continuous-testing=disabled` to your `src/main/resources/application.properties`.
186186

187-
You can find more details about controlling continuous testing in https://quarkus.io/guides/continuous-testing#controlling-continuous-testing[this guide].
187+
You can find more details about controlling continuous testing in https://quarkus.io/guides/continuous-testing#controlling-continuous-testing[this guide].

documentation/modules/ROOT/pages/03_configuration.adoc

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
= Configuration
22

3-
Hardcoded values in your code is a no go, so let's see how to add configuration to your application.
3+
Hardcoded values in your code is a no go, so let's see how to add configuration to your application.
44
Quarkus relies on the MicroProfile Config specification and the main configuration file is `application.properties`.
55

66
== Using a config property in your code
@@ -38,23 +38,17 @@ If you refresh your browser pointing to http://localhost:8080/hello[window="_bla
3838
[.console-output]
3939
[source,text]
4040
----
41-
jakarta.enterprise.inject.spi.DeploymentException: No config value of type [java.lang.String] exists for: greeting
42-
at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:37)
43-
at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigProperties61.deploy_0(ConfigBuildStep$validateConfigProperties61.zig:120)
44-
at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigProperties61.deploy(ConfigBuildStep$validateConfigProperties61.zig:36)
45-
at io.quarkus.runner.ApplicationImpl.doStart(ApplicationImpl.zig:166)
46-
at io.quarkus.runtime.Application.start(Application.java:89)
47-
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:90)
48-
at io.quarkus.runtime.Quarkus.run(Quarkus.java:61)
49-
at io.quarkus.runtime.Quarkus.run(Quarkus.java:38)
50-
at io.quarkus.runtime.Quarkus.run(Quarkus.java:106)
51-
at io.quarkus.runner.GeneratedMain.main(GeneratedMain.zig:29)
52-
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
53-
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
54-
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
55-
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
56-
at io.quarkus.runner.bootstrap.StartupActionImpl$1.run(StartupActionImpl.java:99)
57-
at java.base/java.lang.Thread.run(Thread.java:834)
41+
io.quarkus.runtime.configuration.ConfigurationException: Failed to load config value of type class java.lang.String for: greeting
42+
at io.quarkus.arc.runtime.ConfigRecorder.validateConfigProperties(ConfigRecorder.java:70)
43+
at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigValues1665125174.deploy_0(Unknown Source)
44+
at io.quarkus.deployment.steps.ConfigBuildStep$validateConfigValues1665125174.deploy(Unknown Source)
45+
at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
46+
at io.quarkus.runtime.Application.start(Application.java:101)
47+
at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:111)
48+
at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
49+
at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
50+
at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
51+
at io.quarkus.runner.GeneratedMain.main(Unknown Source)
5852
----
5953

6054
Which is expected, since we didn't provide the `greeting` property neither at the `application.properties` file nor with some runtime configuration.
@@ -78,7 +72,7 @@ You can also use `curl` to check the same result:
7872
[.console-input]
7973
[source,bash]
8074
----
81-
curl localhost:8080/hello
75+
curl -w '\n' localhost:8080/hello
8276
----
8377

8478
[.console-output]
@@ -87,9 +81,9 @@ curl localhost:8080/hello
8781
Hello y'all!
8882
----
8983

90-
== Update your integration test
84+
== Update your test
9185

92-
Since we changed the output of our `/hello` endpoint, our integration test doesn't pass anymore.
86+
Since we changed the output of our `/hello` endpoint, our test doesn't pass anymore.
9387

9488
Let's update `GreetingResourceTest` to reflect our recent changes:
9589

@@ -136,7 +130,7 @@ Now run your tests to check if everything is ok:
136130
[tabs]
137131
====
138132
Maven::
139-
+
133+
+
140134
--
141135
[.console-input]
142136
[source,bash,subs="+macros,+attributes"]
@@ -177,7 +171,7 @@ quarkus test
177171
[tabs]
178172
====
179173
Maven::
180-
+
174+
+
181175
--
182176
[.console-input]
183177
[source,bash,subs="+macros,+attributes"]

documentation/modules/ROOT/pages/06_dev-services.adoc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ TIP: You technically don't need to add the `db-kind` property since there is onl
2525
greeting=Hello y'all!
2626
quarkus.datasource.db-kind=postgresql
2727
quarkus.hibernate-orm.database.generation=drop-and-create
28+
quarkus.hibernate-orm.sql-load-script=import.sql
2829
----
2930

3031
WARNING: Make sure the h2 `db-kind` and `jdbc.url` properties have been removed.
@@ -39,8 +40,8 @@ Maven::
3940
[.console-input]
4041
[source,bash,subs="+macros,+attributes"]
4142
----
42-
./mvnw quarkus:remove-extension -Dextension=quarkus-jdbc-h2
4343
./mvnw quarkus:add-extension -Dextension=quarkus-jdbc-postgresql
44+
./mvnw quarkus:remove-extension -Dextension=quarkus-jdbc-h2
4445
----
4546
4647
--
@@ -50,8 +51,8 @@ Quarkus CLI::
5051
[.console-input]
5152
[source,bash,subs="+macros,+attributes"]
5253
----
53-
quarkus extension remove quarkus-jdbc-h2
5454
quarkus extension add quarkus-jdbc-postgresql
55+
quarkus extension remove quarkus-jdbc-h2
5556
----
5657
--
5758
====
@@ -62,12 +63,12 @@ Notice in the logs how Quarkus has reloaded and started up a PostgreSQL database
6263
[.console-output]
6364
[source,text]
6465
----
65-
2023-03-16 08:06:56,882 INFO [io.qua.dat.dep.dev.DevServicesDatasourceProcessor] (build-13) Dev Services for the default datasource (postgresql) started - container ID is c7c9a6ccf029
66+
2024-05-23 17:46:51,225 INFO [io.qua.dat.dep.dev.DevServicesDatasourceProcessor] (build-32) Dev Services for default datasource (postgresql) started - container ID is b2957fbe64ee
6667
----
6768

68-
== Verify Postgresql testcontainer is running
69+
== Verify PostgreSQL container is running
6970

70-
Let's verify in Docker/Podman that the Dev Services container is running. You should see 2 containers, one testcontainers/ryuk container which orchestrates the Dev Services, and another PostgreSQL container which is running the database and which is automatically wired into our Quarkus dev mode:
71+
Let's verify in Docker/Podman that the Dev Services container is running. You should see 2 containers, one `testcontainers/ryuk` container which orchestrates the Dev Services, and another `postgres` container which is running the database and which is automatically wired into our Quarkus dev mode:
7172

7273
[.console-input]
7374
[source,bash,subs="+macros,+attributes"]
@@ -83,7 +84,7 @@ Call the fruit endpoint again. The data is now coming from the PostgreSQL databa
8384
[.console-input]
8485
[source,bash,subs="+macros,+attributes"]
8586
----
86-
curl localhost:8080/fruit?season=Spring
87+
curl -w '\n' localhost:8080/fruit?season=Spring
8788
----
8889

8990
[.console-output]

documentation/modules/ROOT/pages/07_spring.adoc

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Maven::
1414
[.console-input]
1515
[source,bash,subs="+macros,+attributes"]
1616
----
17-
./mvnw quarkus:remove-extension -D"extensions=rest"
1817
./mvnw quarkus:add-extension -D"extensions=spring-web,spring-data-jpa"
1918
----
2019
@@ -25,7 +24,6 @@ Quarkus CLI::
2524
[.console-input]
2625
[source,bash,subs="+macros,+attributes"]
2726
----
28-
quarkus ext remove rest
2927
quarkus ext add spring-web spring-data-jpa
3028
----
3129
--
@@ -40,14 +38,14 @@ quarkus ext add spring-web spring-data-jpa
4038
[INFO] Building tutorial-app 1.0-SNAPSHOT
4139
[INFO] --------------------------------[ jar ]---------------------------------
4240
[INFO]
43-
[INFO] --- quarkus-maven-plugin:1.4.2.Final:add-extension (default-cli) @ tutorial-app ---
41+
[INFO] --- quarkus-maven-plugin:3.10.2:add-extension (default-cli) @ tutorial-app ---
4442
✅ Adding extension io.quarkus:quarkus-spring-data-jpa
4543
✅ Adding extension io.quarkus:quarkus-spring-web
4644
[INFO] ------------------------------------------------------------------------
4745
[INFO] BUILD SUCCESS
4846
[INFO] ------------------------------------------------------------------------
4947
[INFO] Total time: 2.052 s
50-
[INFO] Finished at: 2020-05-11T21:33:15-04:00
48+
[INFO] Finished at: 2024-05-23T21:33:15-04:00
5149
[INFO] ------------------------------------------------------------------------
5250
----
5351

@@ -115,7 +113,7 @@ Let's try to filter only the fruits with the *Summer* season. Don't forget to s
115113
[.console-input]
116114
[source,bash]
117115
----
118-
curl localhost:8080/spring-fruit?season=Summer
116+
curl -w '\n' localhost:8080/spring-fruit?season=Summer
119117
----
120118

121119
[.console-output]

documentation/modules/ROOT/pages/08_rest-client.adoc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ quarkus extension add rest-client-jackson
6262
[INFO] Building tutorial-app 1.0-SNAPSHOT
6363
[INFO] --------------------------------[ jar ]---------------------------------
6464
[INFO]
65-
[INFO] --- quarkus-maven-plugin:1.4.2.Final:add-extension (default-cli) @ tutorial-app ---
65+
[INFO] --- quarkus-maven-plugin:3.10.2:add-extension (default-cli) @ tutorial-app ---
6666
✅ Adding extension io.quarkus:quarkus-rest-client-jackson
6767
[INFO] ------------------------------------------------------------------------
6868
[INFO] BUILD SUCCESS
6969
[INFO] ------------------------------------------------------------------------
7070
[INFO] Total time: 1.773 s
71-
[INFO] Finished at: 2020-05-11T21:43:38-04:00
71+
[INFO] Finished at: 2024-05-23T21:43:38-04:00
7272
[INFO] ------------------------------------------------------------------------
7373
----
7474
@@ -253,8 +253,6 @@ import jakarta.ws.rs.core.Response.Status;
253253
@Path("/fruit")
254254
public class FruitResource {
255255
256-
257-
258256
@RestClient
259257
@Inject
260258
FruityViceService fruityViceService;
@@ -269,7 +267,6 @@ public class FruitResource {
269267
return Response.status(Status.CREATED).entity(fruit).build();
270268
}
271269
272-
273270
@GET
274271
@Produces(MediaType.APPLICATION_JSON)
275272
public List<FruitDTO> fruits(@QueryParam("season") String season) {

documentation/modules/ROOT/pages/_partials/compile-and-run.adoc

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ a|
1616
[.console-input]
1717
[source,bash,subs="+macros,+attributes"]
1818
----
19-
./mvnw package
19+
./mvnw package
2020
----
2121
2222
a|
@@ -44,9 +44,9 @@ Native mode::
4444
+
4545
--
4646
47-
Quarkus simplifies the https://quarkus.io/guides/building-native-image[compilation of Java applications down to a native binary] using GraalVM/Mandrel. To do so, add a "native" flag to your build command.
47+
Quarkus simplifies the https://quarkus.io/guides/building-native-image[compilation of Java applications down to a native binary] using GraalVM/Mandrel. To do so, add a "native" flag to your build command.
4848
49-
NOTE: To force building a native binary in a GraalVM Mandrel container, add `-Dquarkus.native.container-build=true`.
49+
NOTE: To force building a native binary in a GraalVM Mandrel container, add `-Dquarkus.native.container-build=true`.
5050
5151
[%header,cols="1,1"]
5252
|=====
@@ -108,7 +108,7 @@ a|
108108
[.console-input]
109109
[source,bash,subs="+macros,+attributes"]
110110
----
111-
quarkus image build --native
111+
quarkus image build --native
112112
----
113113
|=====
114114
@@ -132,11 +132,11 @@ You'll see an output like this one:
132132
[.console-output]
133133
[source,text]
134134
----
135-
__ ____ __ _____ ___ __ ____ ______
136-
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
137-
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
138-
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
139-
2023-07-07 11:47:14,046 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT native (powered by Quarkus 3.2.0.Final) started in 0.019s. Listening on: http://0.0.0.0:8080
140-
2023-07-07 11:47:14,047 INFO [io.quarkus] (main) Profile prod activated.
135+
__ ____ __ _____ ___ __ ____ ______
136+
--/ __ \/ / / / _ | / _ \/ //_/ / / / __/
137+
-/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \
138+
--\___\_\____/_/ |_/_/|_/_/|_|\____/___/
139+
2023-07-07 11:47:14,046 INFO [io.quarkus] (main) code-with-quarkus 1.0.0-SNAPSHOT native (powered by Quarkus 3.10.2) started in 0.019s. Listening on: http://0.0.0.0:8080
140+
2023-07-07 11:47:14,047 INFO [io.quarkus] (main) Profile prod activated.
141141
2023-07-07 11:47:14,047 INFO [io.quarkus] (main) Installed features: [cdi, -reactive, smallrye-context-propagation, vertx]
142142
----

0 commit comments

Comments
 (0)