From 105bf2a20949122c0796b4afa3024fe53a8d3252 Mon Sep 17 00:00:00 2001 From: Aowss Ibrahim Date: Tue, 16 Apr 2024 10:38:57 -0400 Subject: [PATCH] Move common configurations to application.yaml --- README.md | 5 ++++- .../src/main/resources/application-cloud.yaml | 6 ------ .../src/main/resources/application-local.yaml | 3 --- .../src/main/resources/application.yaml | 2 ++ .../src/main/resources/application-cloud.yaml | 17 ----------------- .../src/main/resources/application-local.yaml | 14 -------------- .../src/main/resources/application.yaml | 13 +++++++++++++ .../src/main/resources/application-cloud.yaml | 19 +++++-------------- .../src/main/resources/application-local.yaml | 16 ---------------- .../task/src/main/resources/application.yaml | 12 ++++++++++++ 10 files changed, 36 insertions(+), 71 deletions(-) create mode 100644 spring-boot/error-handling/src/main/resources/application.yaml create mode 100644 spring-boot/rest-connector/src/main/resources/application.yaml create mode 100644 spring-boot/task/src/main/resources/application.yaml diff --git a/README.md b/README.md index d44a9fa..7b6accd 100644 --- a/README.md +++ b/README.md @@ -3,4 +3,7 @@ This is a set of samples for [Camunda](https://camunda.com/) 8. Most of these samples come from the [Camunda documentation](https://docs.camunda.io/). -## Run Locally +# Pre-requisites + +* [Java 21](https://jdk.java.net/21/) +* [Maven](https://maven.apache.org/) \ No newline at end of file diff --git a/spring-boot/error-handling/src/main/resources/application-cloud.yaml b/spring-boot/error-handling/src/main/resources/application-cloud.yaml index ad2b63a..d6e6adb 100644 --- a/spring-boot/error-handling/src/main/resources/application-cloud.yaml +++ b/spring-boot/error-handling/src/main/resources/application-cloud.yaml @@ -1,9 +1,3 @@ -server: - port: 9000 - -# https://github.com/camunda-community-hub/spring-zeebe#configuring-camunda-platform-8-saas-connection -# https://github.com/camunda-community-hub/spring-zeebe#additional-configuration-options - zeebe: client: cloud: diff --git a/spring-boot/error-handling/src/main/resources/application-local.yaml b/spring-boot/error-handling/src/main/resources/application-local.yaml index 9baff20..0f331d2 100644 --- a/spring-boot/error-handling/src/main/resources/application-local.yaml +++ b/spring-boot/error-handling/src/main/resources/application-local.yaml @@ -1,6 +1,3 @@ -server: - port: 9000 - zeebe: client: broker: diff --git a/spring-boot/error-handling/src/main/resources/application.yaml b/spring-boot/error-handling/src/main/resources/application.yaml new file mode 100644 index 0000000..f6707f8 --- /dev/null +++ b/spring-boot/error-handling/src/main/resources/application.yaml @@ -0,0 +1,2 @@ +server: + port: 9000 diff --git a/spring-boot/rest-connector/src/main/resources/application-cloud.yaml b/spring-boot/rest-connector/src/main/resources/application-cloud.yaml index cde3f98..d6e6adb 100644 --- a/spring-boot/rest-connector/src/main/resources/application-cloud.yaml +++ b/spring-boot/rest-connector/src/main/resources/application-cloud.yaml @@ -1,12 +1,3 @@ -server: - port: 9000 - -api: - url: http://${ENV:prod}-rates:9999/exchangeRates - -# https://github.com/camunda-community-hub/spring-zeebe#configuring-camunda-platform-8-saas-connection -# https://github.com/camunda-community-hub/spring-zeebe#additional-configuration-options - zeebe: client: cloud: @@ -14,11 +5,3 @@ zeebe: clusterId: 35eedd8b-35e5-4373-8a4c-f211043e42da clientId: kMVnghsS4TV7lqocluB9AsLNNRSNsCr1 clientSecret: EIt0BqN-bEK~hVbvN8tZO4vPgmZYQ-RbQdnqRwIsyQnZ9Bp-h5XJBT9NuS8cFnu- - -# See https://github.com/camunda/connectors/tree/main/connector-runtime/spring-boot-starter-camunda-connectors -camunda: - connector: - polling: - enabled: false - webhook: - enabled: false diff --git a/spring-boot/rest-connector/src/main/resources/application-local.yaml b/spring-boot/rest-connector/src/main/resources/application-local.yaml index a4acda6..e8e8856 100644 --- a/spring-boot/rest-connector/src/main/resources/application-local.yaml +++ b/spring-boot/rest-connector/src/main/resources/application-local.yaml @@ -1,9 +1,3 @@ -server: - port: 9000 - -api: - url: http://${ENV:prod}-rates:9999/exchangeRates - zeebe: client: broker: @@ -14,11 +8,3 @@ zeebe: client-id: zeebe client-secret: zecret auth-url: http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token - -# See https://github.com/camunda/connectors/tree/main/connector-runtime/spring-boot-starter-camunda-connectors -camunda: - connector: - polling: - enabled: false - webhook: - enabled: false diff --git a/spring-boot/rest-connector/src/main/resources/application.yaml b/spring-boot/rest-connector/src/main/resources/application.yaml new file mode 100644 index 0000000..c0bd6f3 --- /dev/null +++ b/spring-boot/rest-connector/src/main/resources/application.yaml @@ -0,0 +1,13 @@ +server: + port: 9000 + +api: + url: http://${ENV:prod}-rates:9999/exchangeRates + +# See https://github.com/camunda/connectors/tree/main/connector-runtime/spring-boot-starter-camunda-connectors +camunda: + connector: + polling: + enabled: false + webhook: + enabled: false diff --git a/spring-boot/task/src/main/resources/application-cloud.yaml b/spring-boot/task/src/main/resources/application-cloud.yaml index 749d152..3974c8d 100644 --- a/spring-boot/task/src/main/resources/application-cloud.yaml +++ b/spring-boot/task/src/main/resources/application-cloud.yaml @@ -1,22 +1,13 @@ -server: - port: 9000 - -api: - url: http://${ENV:prod}-rates:9999/exchangeRates - -# https://github.com/camunda-community-hub/spring-zeebe#configuring-camunda-platform-8-saas-connection -# https://github.com/camunda-community-hub/spring-zeebe#additional-configuration-options - zeebe: client: cloud: region: ont-1 - clusterId: 35eedd8b-35e5-4373-8a4c-f211043e42da - clientId: kMVnghsS4TV7lqocluB9AsLNNRSNsCr1 - clientSecret: EIt0BqN-bEK~hVbvN8tZO4vPgmZYQ-RbQdnqRwIsyQnZ9Bp-h5XJBT9NuS8cFnu- + cluster-id: 35eedd8b-35e5-4373-8a4c-f211043e42da + client-id: kMVnghsS4TV7lqocluB9AsLNNRSNsCr1 + client-secret: EIt0BqN-bEK~hVbvN8tZO4vPgmZYQ-RbQdnqRwIsyQnZ9Bp-h5XJBT9NuS8cFnu- tasklist: url: https://ont-1.tasklist.camunda.io/35eedd8b-35e5-4373-8a4c-f211043e42da keycloak-url: https://login.cloud.camunda.io/oauth/token - client-id: ${zeebe.client.cloud.clientId} - client-secret: ${zeebe.client.cloud.clientSecret} + client-id: ${zeebe.client.cloud.client-id} + client-secret: ${zeebe.client.cloud.client-secret} diff --git a/spring-boot/task/src/main/resources/application-local.yaml b/spring-boot/task/src/main/resources/application-local.yaml index 01c7fe8..cce2202 100644 --- a/spring-boot/task/src/main/resources/application-local.yaml +++ b/spring-boot/task/src/main/resources/application-local.yaml @@ -1,12 +1,3 @@ -server: - port: 9000 - -api: - url: http://${ENV:prod}-rates:9999/exchangeRates - -# https://github.com/camunda-community-hub/spring-zeebe#configuring-camunda-platform-8-saas-connection -# https://github.com/camunda-community-hub/spring-zeebe#additional-configuration-options - zeebe: client: broker: @@ -23,10 +14,3 @@ tasklist: keycloak-url: http://localhost:18080 client-id: ${zeebe.client.cloud.client-id} client-secret: ${zeebe.client.cloud.client-secret} - -camunda: - connector: - polling: - enabled: false - webhook: - enabled: false diff --git a/spring-boot/task/src/main/resources/application.yaml b/spring-boot/task/src/main/resources/application.yaml new file mode 100644 index 0000000..423aa85 --- /dev/null +++ b/spring-boot/task/src/main/resources/application.yaml @@ -0,0 +1,12 @@ +server: + port: 9000 + +api: + url: http://${ENV:prod}-rates:9999/exchangeRates + +camunda: + connector: + polling: + enabled: false + webhook: + enabled: false