diff --git a/README.md b/README.md index 58329d37..76790de6 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ Our tests are now real integration tests with real postgres DB, and are stuitabl ## Access your REST endpoint -Go to http://localhost:8080/animals +Go to http://localhost:8080/ ## OpenAPI & Swagger UI diff --git a/src/main/java/com/devonfw/quarkus/productmanagement/service/v1/ProductRestService.java b/src/main/java/com/devonfw/quarkus/productmanagement/service/v1/ProductRestService.java index b886fcea..9569ba65 100644 --- a/src/main/java/com/devonfw/quarkus/productmanagement/service/v1/ProductRestService.java +++ b/src/main/java/com/devonfw/quarkus/productmanagement/service/v1/ProductRestService.java @@ -30,7 +30,7 @@ //In Quarkus all JAX-RS resources are treated as CDI beans //default is Singleton scope -@Path("/products") +@Path("/product") // how we serialize response @Produces(MediaType.APPLICATION_JSON) // how we deserialize params @@ -61,35 +61,35 @@ public PageImpl getAll(@BeanParam ProductSearchCriteriaDto dto) { } @GET - @Path("criteriaApi") - public PageImpl getAllCriteriaApi(@BeanParam ProductSearchCriteriaDto dto) { + @Path("search") + public PageImpl getProductsByCriteriaApi(@BeanParam ProductSearchCriteriaDto dto) { return (PageImpl) this.ucFindProduct.findProductsByCriteriaApi(dto); } - @GET - @Path("queryDsl") - public PageImpl getAllQueryDsl(@BeanParam ProductSearchCriteriaDto dto) { + @POST + @Path("search") + public PageImpl getProductsByQueryDsl(@BeanParam ProductSearchCriteriaDto dto) { return (PageImpl) this.ucFindProduct.findProductsByQueryDsl(dto); } @GET - @Path("query") - public PageImpl getAllQuery(@BeanParam ProductSearchCriteriaDto dto) { + @Path("searchbytitle") + public PageImpl getProductsByTitleQuery(@BeanParam ProductSearchCriteriaDto dto) { return (PageImpl) this.ucFindProduct.findProductsByTitleQuery(dto); } - @GET - @Path("nativeQuery") + @POST + @Path("searchbytitle") public PageImpl getAllNativeQuery(@BeanParam ProductSearchCriteriaDto dto) { return (PageImpl) this.ucFindProduct.findProductsByTitleNativeQuery(dto); } @GET - @Path("ordered") + @Path("searchall") public PageImpl getAllOrderedByTitle() { return (PageImpl) this.ucFindProduct.findProductsOrderedByTitle();