diff --git a/retail-store-webapp/ReadMe.md b/retail-store-webapp/ReadMe.md index 68d62040..0b03feec 100644 --- a/retail-store-webapp/ReadMe.md +++ b/retail-store-webapp/ReadMe.md @@ -14,9 +14,9 @@ username: admin password : admin1234 ``` -## UI +## UI -http://localhost:8080 +[Local UI](http://localhost:8080) ## Export realm diff --git a/retail-store-webapp/pom.xml b/retail-store-webapp/pom.xml index ea3d75eb..a50dce34 100644 --- a/retail-store-webapp/pom.xml +++ b/retail-store-webapp/pom.xml @@ -70,6 +70,10 @@ io.opentelemetry opentelemetry-exporter-zipkin + + org.webjars + webjars-locator-core + org.webjars bootstrap @@ -88,7 +92,7 @@ org.webjars.npm alpinejs - 3.13.10 + 3.14.0 diff --git a/retail-store-webapp/src/main/java/com/example/retailstore/webapp/web/controller/ProductController.java b/retail-store-webapp/src/main/java/com/example/retailstore/webapp/web/controller/ProductController.java index 6e196067..fe756f0a 100644 --- a/retail-store-webapp/src/main/java/com/example/retailstore/webapp/web/controller/ProductController.java +++ b/retail-store-webapp/src/main/java/com/example/retailstore/webapp/web/controller/ProductController.java @@ -34,8 +34,8 @@ String showProductsPage(@RequestParam(name = "page", defaultValue = "1") int pag @GetMapping("/api/products") @ResponseBody - PagedResult products(@RequestParam(name = "page", defaultValue = "0") int page, Model model) { - log.info("Fetching products for page: {}", page); - return catalogService.getProducts(page); + PagedResult products(@RequestParam(name = "page", defaultValue = "1") int page, Model model) { + log.info("Fetching products for page: {}", page - 1); + return catalogService.getProducts(page - 1); } } diff --git a/retail-store-webapp/src/main/resources/templates/layout.html b/retail-store-webapp/src/main/resources/templates/layout.html index c1de9e2e..e02a3df1 100644 --- a/retail-store-webapp/src/main/resources/templates/layout.html +++ b/retail-store-webapp/src/main/resources/templates/layout.html @@ -62,7 +62,7 @@ - +