Skip to content

Commit

Permalink
fix broken code example
Browse files Browse the repository at this point in the history
Signed-off-by: Gavin King <[email protected]>
  • Loading branch information
gavinking committed Oct 25, 2024
1 parent c030768 commit 45ca8f2
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,8 @@ Whatever the case, the code which orchestrates a unit of work usually just calls
[source,java]
----
@GET
@Path("books/{titlePattern}")
public List<Book> findBooks(String titlePattern) {
@Path("books/{titlePattern}/{page:\\d+}")
public List<Book> findBooks(String titlePattern, int page) {
var books = sessionFactory.fromTransaction(session ->
Queries.findBooksByTitleWithPagination(session, titlePattern,
Page.page(RESULTS_PER_PAGE, page));
Expand Down Expand Up @@ -565,8 +565,8 @@ We can call it just like we called our handwritten version:
[source,java]
----
@GET
@Path("books/{titlePattern}")
public List<Book> findBooks(String titlePattern) {
@Path("books/{titlePattern}/{page:\\d+}")
public List<Book> findBooks(String titlePattern, int page) {
var books = sessionFactory.fromTransaction(session ->
Queries_.findBooksByTitleWithPagination(session, titlePattern,
Page.page(RESULTS_PER_PAGE, page));
Expand Down

0 comments on commit 45ca8f2

Please sign in to comment.