You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _versions/main/guides/getting-started-dev-services.adoc
+12-12
Original file line number
Diff line number
Diff line change
@@ -27,7 +27,7 @@ This guide helps you:
27
27
:prerequisites-no-graalvm:
28
28
include::{includes}/prerequisites.adoc[]
29
29
30
-
This tutorial builds on what you learned writing xref:{doc-guides}/getting-started.adoc[your first Quarkus application].
30
+
This tutorial builds on what you learned writing xref:getting-started.adoc[your first Quarkus application].
31
31
You will not need the code from that application, but make sure you understand the concepts.
32
32
33
33
== Solution
@@ -79,7 +79,7 @@ Once the application is up, visit http://localhost:8080/hello. It should show a
79
79
=== Accepting user input
80
80
81
81
Let's make the application a bit more interactive.
82
-
Open the project in your IDE and navigate to `src/main/java/org/acme/GreetingResource.java'
82
+
Open the project in your IDE and navigate to `src/main/java/org/acme/GreetingResource.java`
83
83
Add a query param in the `hello` method.
84
84
(The `org.jboss.resteasy.reactive.RestQuery` annotation is like the Jakarta REST `@QueryParam`
85
85
annotation, except you don't need to duplicate the parameter name.)
@@ -142,7 +142,7 @@ public class Greeting extends PanacheEntity {
142
142
}
143
143
----
144
144
145
-
The entity makes use of xref:{doc-guides}hibernate-orm-panache.adoc[Panache], a layer on top of Hibernate ORM.
145
+
The entity makes use of xref:hibernate-orm-panache.adoc[Panache], a layer on top of Hibernate ORM.
146
146
Extending `PanacheEntity` brings in a range of methods for reading, writing, and finding data.
147
147
Because all the data access methods are on the `Greeting` entity, rather than on a separate data access class,
148
148
this is an example of the active record pattern.
@@ -199,7 +199,7 @@ public String names() {
199
199
}
200
200
----
201
201
202
-
To try it out, visit http://localhost:8080/hello?name=Bloom, and then http://localhost/hello/names.
202
+
To try it out, visit http://localhost:8080/hello?name=Bloom, and then http://localhost:8080/hello/names.
203
203
204
204
You should see the following message: "I've said hello to Bloom".
205
205
@@ -215,11 +215,11 @@ you will start seeing failures in the Quarkus logs at this point.
215
215
Reading and writing to the database seems to be working well, but that's a bit unexpected.
216
216
Where did a PostgreSQL database come from? You didn't set anything up.
217
217
218
-
The database is being managed using xref:{docfile}/dev-services.adoc[Dev Services].
218
+
The database is being managed using xref:dev-services.adoc[Dev Services].
219
219
Dev Services take care of stopping and starting services needed by your application.
220
220
Because you
221
221
included the `jdbc-postgresql` dependency, the database is a containerised PostgreSQL database.
222
-
If you'd added `jdbc-mysql` insead, you would have gotten a containerised MySQL database.
222
+
If you'd added `jdbc-mysql` instead, you would have gotten a containerised MySQL database.
223
223
224
224
If you like, use your container tool to see what containers are running.
225
225
For example, if you're using Docker, run `docker ps`, and for podman, run `podman ps`.
@@ -235,10 +235,10 @@ Quarkus will automatically stop the container when your application stops.
235
235
236
236
=== Initialising services
237
237
238
-
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.
238
+
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.
239
239
What's going on? By default, in dev mode, with a Dev Services database,
240
240
Quarkus configures Hibernate ORM database generation to be `drop-and-create`.
241
-
See the xref:{docfile}/hibernate-orm.adoc#quarkus-hibernate-orm_quarkus.hibernate-orm.database-database-related-configuration[Hibernate configuration reference] for more details.
241
+
See the xref:hibernate-orm.adoc#quarkus-hibernate-orm_quarkus.hibernate-orm.database-database-related-configuration[Hibernate configuration reference] for more details.
242
242
If a code change triggers an application restart, the database tables
243
243
will be dropped (deleted) and then re-created.
244
244
@@ -282,7 +282,7 @@ This tells Quarkus that you don't want it to start a Dev Service,
282
282
because you have your own database. You don't need to worry about starting
283
283
the database, because you're just seeing how to change the configuration.
284
284
285
-
Visit `http://localhost:8080/hello/names`. Instead of a list of names,
285
+
Visit http://localhost:8080/hello/names. Instead of a list of names,
286
286
you'll get a red error screen. In the terminal where Quarkus is running.
287
287
you'll see the following stack error message:
288
288
@@ -310,7 +310,7 @@ but have it *only* used in production, so you could still use dev services the r
310
310
311
311
Add a `%prod.`
312
312
prefix to the database configuration. This means the configuration
313
-
only applies to the xref:{docfile}/config-reference#profiles[prod profile]
313
+
only applies to the xref:config-reference.adoc#profiles[prod profile]
314
314
315
315
The configuration should look like this:
316
316
@@ -341,6 +341,6 @@ a 'real' database, without you having to configure anything.
Copy file name to clipboardExpand all lines: _versions/main/guides/reactive-routes.adoc
+7-1
Original file line number
Diff line number
Diff line change
@@ -138,7 +138,7 @@ public void blocking(RoutingContext rc) {
138
138
// ...
139
139
}
140
140
----
141
-
When `@Blocking` is used, it ignores the `type` attribute of `@Route`.
141
+
When `@Blocking` is used, the `type` attribute of the `@Route` is ignored.
142
142
====
143
143
144
144
The `@Route` annotation is repeatable and so you can declare several routes for a single method:
@@ -164,6 +164,12 @@ String person() {
164
164
----
165
165
<1> If the `accept` header matches `text/html`, we set the content type automatically to `text/html`.
166
166
167
+
=== Executing route on a virtual thread
168
+
169
+
You can annotate a route method with `@io.smallrye.common.annotation.RunOnVirtualThread` in order to execute it on a virtual thread.
170
+
However, keep in mind that not everything can run safely on virtual threads.
171
+
You should read the xref:virtual-threads.adoc#run-code-on-virtual-threads-using-runonvirtualthread[Virtual thread support reference] carefully and get acquainted with all the details.
172
+
167
173
=== Handling conflicting routes
168
174
169
175
You may end up with multiple routes matching a given path.
0 commit comments