diff --git a/account/pom.xml b/account/pom.xml index c1aa503..bef94d7 100644 --- a/account/pom.xml +++ b/account/pom.xml @@ -8,6 +8,10 @@ account + + ${project.artifactId} + + org.apache.camel diff --git a/camel-common/pom.xml b/camel-common/pom.xml index a3b964a..1a86f04 100644 --- a/camel-common/pom.xml +++ b/camel-common/pom.xml @@ -8,6 +8,10 @@ camel-common + + ${project.artifactId} + + diff --git a/customer/pom.xml b/customer/pom.xml index 0686e65..d4a0230 100644 --- a/customer/pom.xml +++ b/customer/pom.xml @@ -8,6 +8,10 @@ customer + + ${project.artifactId} + + org.apache.camel diff --git a/gateway/pom.xml b/gateway/pom.xml index 3b410b6..1991414 100644 --- a/gateway/pom.xml +++ b/gateway/pom.xml @@ -8,6 +8,10 @@ gateway + + ${project.artifactId} + + org.springframework.boot diff --git a/gateway/src/main/java/pl/piomin/services/camel/gateway/RouteGateway.java b/gateway/src/main/java/pl/piomin/services/camel/gateway/RouteGateway.java index f44d8d2..5f599f2 100644 --- a/gateway/src/main/java/pl/piomin/services/camel/gateway/RouteGateway.java +++ b/gateway/src/main/java/pl/piomin/services/camel/gateway/RouteGateway.java @@ -37,43 +37,43 @@ public void configure() throws Exception { JacksonDataFormat formatCusList = new JacksonDataFormat(Customer.class); formatAccList.useList(); - rest("/account") - .get("/{id}").description("Find account by id").outType(Account.class) - .param().name("id").type(RestParamType.path).description("Account identificator").dataType("int").endParam() - .route().serviceCall("account").unmarshal(formatAcc) - .endRest() - .get("/customer/{customerId}").description("Find account by customer id").outType(Account.class) - .param().name("customerId").type(RestParamType.path).description("Customer identificator").dataType("int").endParam() - .route().serviceCall("account").unmarshal(formatAcc) - .endRest() - .get("/").description("Find all accounts").outType(List.class) - .route().serviceCall("account").unmarshal(formatAccList) - .endRest() - .post("/").description("Add new account").outType(List.class) - .param().name("account").type(RestParamType.body).description("Account JSON object").dataType("Account").endParam() - .route().serviceCall("account").unmarshal(formatAcc) - .endRest(); +// rest("/account") +// .get("/{id}").description("Find account by id").outType(Account.class) +// .param().name("id").type(RestParamType.path).description("Account identificator").dataType("int").endParam() +// .route().serviceCall("account").unmarshal(formatAcc) +// .endRest() +// .get("/customer/{customerId}").description("Find account by customer id").outType(Account.class) +// .param().name("customerId").type(RestParamType.path).description("Customer identificator").dataType("int").endParam() +// .route().serviceCall("account").unmarshal(formatAcc) +// .endRest() +// .get("/").description("Find all accounts").outType(List.class) +// .route().serviceCall("account").unmarshal(formatAccList) +// .endRest() +// .post("/").description("Add new account").outType(List.class) +// .param().name("account").type(RestParamType.body).description("Account JSON object").dataType("Account").endParam() +// .route().serviceCall("account").unmarshal(formatAcc) +// .endRest(); +// +// rest("/customer") +// .get("/{id}").description("Find customer by id").outType(Customer.class) +// .param().name("id").type(RestParamType.path).description("Customer identificator").dataType("int").endParam() +// .route().serviceCall("customer").unmarshal(formatCus) +// .endRest() +// .get("/").description("Find all customers").outType(List.class) +// .route().serviceCall("customer").unmarshal(formatCusList) +// .endRest() +// .post("/").description("Add new customer").outType(List.class) +// .param().name("customer").type(RestParamType.body).description("Customer JSON object").dataType("Account").endParam() +// .route().serviceCall("customer").unmarshal(formatCus) +// .endRest(); - rest("/customer") - .get("/{id}").description("Find customer by id").outType(Customer.class) - .param().name("id").type(RestParamType.path).description("Customer identificator").dataType("int").endParam() - .route().serviceCall("customer").unmarshal(formatCus) - .endRest() - .get("/").description("Find all customers").outType(List.class) - .route().serviceCall("customer").unmarshal(formatCusList) - .endRest() - .post("/").description("Add new customer").outType(List.class) - .param().name("customer").type(RestParamType.body).description("Customer JSON object").dataType("Account").endParam() - .route().serviceCall("customer").unmarshal(formatCus) - .endRest(); - -// from("rest:get:account:/{id}").serviceCall("account"); -// from("rest:get:account:/customer/{customerId}").serviceCall("account"); -// from("rest:get:account:/").serviceCall("account"); -// from("rest:post:account:/").serviceCall("account"); -// from("rest:get:customer:/{id}").serviceCall("customer"); -// from("rest:get:customer:/").serviceCall("customer"); -// from("rest:post:customer:/").serviceCall("customer"); + from("rest:get:account:/{id}").serviceCall("account"); + from("rest:get:account:/customer/{customerId}").serviceCall("account"); + from("rest:get:account:/").serviceCall("account"); + from("rest:post:account:/").serviceCall("account"); + from("rest:get:customer:/{id}").serviceCall("customer"); + from("rest:get:customer:/").serviceCall("customer"); + from("rest:post:customer:/").serviceCall("customer"); } } diff --git a/pom.xml b/pom.xml index 27c02f8..4397be3 100644 --- a/pom.xml +++ b/pom.xml @@ -9,14 +9,14 @@ org.springframework.boot spring-boot-starter-parent - 2.3.5.RELEASE + 2.7.11 UTF-8 UTF-8 - 11 - 3.6.0 + 17 + 3.20.3 piomin_sample-camel-spring-boot piomin https://sonarcloud.io