Skip to content

Commit 45ca8f2

Browse files
committed
fix broken code example
Signed-off-by: Gavin King <[email protected]>
1 parent c030768 commit 45ca8f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

documentation/src/main/asciidoc/introduction/Introduction.adoc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,8 +533,8 @@ Whatever the case, the code which orchestrates a unit of work usually just calls
533533
[source,java]
534534
----
535535
@GET
536-
@Path("books/{titlePattern}")
537-
public List<Book> findBooks(String titlePattern) {
536+
@Path("books/{titlePattern}/{page:\\d+}")
537+
public List<Book> findBooks(String titlePattern, int page) {
538538
var books = sessionFactory.fromTransaction(session ->
539539
Queries.findBooksByTitleWithPagination(session, titlePattern,
540540
Page.page(RESULTS_PER_PAGE, page));
@@ -565,8 +565,8 @@ We can call it just like we called our handwritten version:
565565
[source,java]
566566
----
567567
@GET
568-
@Path("books/{titlePattern}")
569-
public List<Book> findBooks(String titlePattern) {
568+
@Path("books/{titlePattern}/{page:\\d+}")
569+
public List<Book> findBooks(String titlePattern, int page) {
570570
var books = sessionFactory.fromTransaction(session ->
571571
Queries_.findBooksByTitleWithPagination(session, titlePattern,
572572
Page.page(RESULTS_PER_PAGE, page));

0 commit comments

Comments
 (0)