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

acosentino pushed a commit to branch sb-context-reload
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 32aa267497807a6d885214f421a77014dc516286
Author: Andrea Cosentino <anco...@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 <anco...@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() {

Reply via email to