You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2023/07/14 13:17:33 UTC

[camel] branch main updated: Camel-Jbang: Export with secret refresh, the context reload properties should have springboot as prefix, when the runtime is SB

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new 7a5f199374d Camel-Jbang: Export with secret refresh, the context reload properties should have springboot as prefix, when the runtime is SB
7a5f199374d is described below

commit 7a5f199374d4858b12e85b28cf745319fdf29c5f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Jul 14 14:46:46 2023 +0200

    Camel-Jbang: Export with secret refresh, the context reload properties should have springboot as prefix, when the runtime is SB
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../dsl/jbang/core/commands/ExportBaseCommand.java     | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
index 0c661ca02b8..4a066fbd2b8 100644
--- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
+++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/ExportBaseCommand.java
@@ -768,7 +768,11 @@ abstract class ExportBaseCommand extends CamelCommand {
         properties.setProperty("camel.vault.aws.refreshEnabled", "true");
         properties.setProperty("camel.vault.aws.refreshPeriod", "30000");
         properties.setProperty("camel.vault.aws.secrets", "<secrets>");
-        properties.setProperty("camel.main.context-reload-enabled", "true");
+        if (runtime.equalsIgnoreCase("spring-boot")) {
+            properties.setProperty("camel.springboot.context-reload-enabled", "true");
+        } else {
+            properties.setProperty("camel.main.context-reload-enabled", "true");
+        }
     }
 
     protected void exportGcpSecretsRefreshProp(Properties properties) {
@@ -779,7 +783,11 @@ abstract class ExportBaseCommand extends CamelCommand {
         properties.setProperty("camel.vault.aws.refreshPeriod", "30000");
         properties.setProperty("camel.vault.gcp.secrets", "<secrets>");
         properties.setProperty("camel.vault.gcp.subscriptionName", "<subscriptionName>");
-        properties.setProperty("camel.main.context-reload-enabled", "true");
+        if (runtime.equalsIgnoreCase("spring-boot")) {
+            properties.setProperty("camel.springboot.context-reload-enabled", "true");
+        } else {
+            properties.setProperty("camel.main.context-reload-enabled", "true");
+        }
     }
 
     protected void exportAzureSecretsRefreshProp(Properties properties) {
@@ -794,7 +802,11 @@ abstract class ExportBaseCommand extends CamelCommand {
         properties.setProperty("camel.vault.azure.blobAccountName", "<blobAccountName>");
         properties.setProperty("camel.vault.azure.blobContainerName", "<blobContainerName>");
         properties.setProperty("camel.vault.azure.blobAccessKey", "<blobAccessKey>");
-        properties.setProperty("camel.main.context-reload-enabled", "true");
+        if (runtime.equalsIgnoreCase("spring-boot")) {
+            properties.setProperty("camel.springboot.context-reload-enabled", "true");
+        } else {
+            properties.setProperty("camel.main.context-reload-enabled", "true");
+        }
     }
 
     protected List<String> getSecretProviders() {