Skip to content

Commit 07c1585

Browse files
committed
Sync documentation of main branch
1 parent 6a62259 commit 07c1585

File tree

5 files changed

+33
-4
lines changed

5 files changed

+33
-4
lines changed

_versions/main/guides/datasource.adoc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ For more details and optional configurations, see xref:databases-dev-services.ad
6565

6666
* `quarkus-jdbc-db2`
6767
* `quarkus-jdbc-derby`
68+
ifdef::note-quarkus-derby[]
69+
+
70+
{note-quarkus-derby}
71+
endif::note-quarkus-derby[]
6872
* `quarkus-jdbc-h2`
6973
* `quarkus-jdbc-mariadb`
7074
* `quarkus-jdbc-mssql`
@@ -151,6 +155,10 @@ Quarkus currently includes the following built-in database kinds:
151155
+
152156
* DB2: `db2`
153157
* Derby: `derby`
158+
ifdef::note-quarkus-derby[]
159+
+
160+
{note-quarkus-derby}
161+
endif::note-quarkus-derby[]
154162
* H2: `h2`
155163
* MariaDB: `mariadb`
156164
* Microsoft SQL Server: `mssql`
@@ -191,6 +199,10 @@ JDBC is the most common database connection pattern, typically needed when used
191199
.. For use with a built-in JDBC driver, choose and add the Quarkus extension for your relational database driver from the list below:
192200
+
193201
* Derby - `quarkus-jdbc-derby`
202+
ifdef::note-quarkus-derby[]
203+
+
204+
{note-quarkus-derby}
205+
endif::note-quarkus-derby[]
194206
* H2 - `quarkus-jdbc-h2`
195207
+
196208
[NOTE]

_versions/main/guides/picocli.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,9 @@ annotationProcessor 'info.picocli:picocli-codegen'
297297

298298
== Development Mode
299299

300-
In the development mode, i.e. when running `mvn quarkus:dev`, the application is executed and restarted every time the `Space bar` key is pressed. You can also pass arguments to your command line app via the `quarkus.args` system property, e.g. `mvn quarkus:dev -Dquarkus.args='--help'` and `mvn quarkus:dev -Dquarkus.args='-c -w --val 1'`. For gradle project arguments can be passed using `--quarkus-args`.
300+
In the development mode, i.e. when running `mvn quarkus:dev`, the application is executed and restarted every time the `Space bar` key is pressed. You can also pass arguments to your command line app via the `quarkus.args` system property, e.g. `mvn quarkus:dev -Dquarkus.args='--help'` and `mvn quarkus:dev -Dquarkus.args='-c -w --val 1'`.
301+
For Gradle projects, arguments can be passed using `--quarkus-args`.
302+
301303
[NOTE]
302304
====
303305
If you're creating a typical Quarkus application (e.g., HTTP-based services) that includes command-line functionality, you'll need to handle the application's lifecycle differently. In the `Runnable.run()` method of your command, make sure to use `Quarkus.waitForExit()` or `Quarkus.asyncExit()`. This will prevent the application from shutting down prematurely and ensure a proper shutdown process.

_versions/main/guides/smallrye-graphql-client.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ to properly qualify the injection point.
287287
If you need to add an authorization header, or any other custom HTTP header (in our case
288288
it's not required), this can be done by:
289289
----
290-
quarkus.smallrye-graphql-client.star-wars-dynamic.header.HEADER-KEY=HEADER-VALUE"
290+
quarkus.smallrye-graphql-client.star-wars-dynamic.header.HEADER-KEY=HEADER-VALUE
291291
----
292292

293293
Add this to the `StarWarsResource` created earlier:

_versions/main/guides/spring-data-jpa.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,9 @@ Interfaces that extend any of the following Spring Data repositories are automat
416416

417417
* `org.springframework.data.repository.Repository`
418418
* `org.springframework.data.repository.CrudRepository`
419+
* `org.springframework.data.repository.ListCrudRepository`
419420
* `org.springframework.data.repository.PagingAndSortingRepository`
421+
* `org.springframework.data.repository.ListPagingAndSortingRepository`
420422
* `org.springframework.data.jpa.repository.JpaRepository`
421423

422424
The generated repositories are also registered as beans so they can be injected into any other bean.

_versions/main/guides/spring-data-rest.adoc

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,15 +327,15 @@ The former is used by default, but it is highly recommended to specify which one
327327
If a database contains many entities, it might not be a great idea to return them all at once.
328328
`PagingAndSortingRepository` allows the `spring-data-rest` extension to access data in chunks.
329329

330-
Replace the `CrudRepository` with `PagingAndSortingRepository` in the `FruitsRepository`:
330+
So, you can extend the `PagingAndSortingRepository`:
331331

332332
[source,java]
333333
----
334334
package org.acme.spring.data.rest;
335335
336336
import org.springframework.data.repository.PagingAndSortingRepository;
337337
338-
public interface FruitsRepository extends PagingAndSortingRepository<Fruit, Long> {
338+
public interface FruitsRepository extends CrudRepository<Fruit, Long>, PagingAndSortingRepository<Fruit, Long> {
339339
}
340340
----
341341

@@ -362,6 +362,19 @@ Now the `GET /fruits` will accept three new query parameters: `sort`, `page` and
362362

363363
For paged responses, `spring-data-rest` also returns a set of link headers that can be used to access other pages: first, previous, next and last.
364364

365+
Additionally, rather than extending both `PagingAndSortingRepository` and `CrudRepository`, you can use `JpaRepository`, which is a higher-level abstraction tailored for JPA. Since `JpaRepository` already extends both `PagingAndSortingRepository` and `CrudRepository`, it can replace `CrudRepository` directly.
366+
367+
[source,java]
368+
----
369+
package org.acme.spring.data.rest;
370+
371+
import org.springframework.data.repository.PagingAndSortingRepository;
372+
373+
public interface FruitsRepository extends JpaRepository<Fruit, Long> {
374+
}
375+
----
376+
377+
365378
==== Fine tuning endpoints generation
366379

367380
This allows user to specify which methods should be exposed and what path should be used to access them.

0 commit comments

Comments
 (0)