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

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

commit bda8aa40f0c57dec27c9e608497af94f697f1446
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Jul 29 07:14:49 2025 +0200

    CAMEL-22285: platform-http-main - Dev consoles should be registered as 
management endpoints
---
 .../camel/component/platform/http/main/MainHttpServer.java   |  7 ++++---
 .../component/platform/http/main/ManagementHttpServer.java   |  7 ++++---
 .../src/main/java/org/apache/camel/main/BaseMainSupport.java | 12 ++++++------
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
index 049aad4dd4e..234cef965bd 100644
--- 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
+++ 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java
@@ -787,9 +787,9 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
 
     private static void healthCheckStatus(StringBuilder sb, boolean up) {
         if (up) {
-            sb.append("    \"status\": \"UP\"\n");
+            sb.append("    \"status\": \"UP\"");
         } else {
-            sb.append("    \"status\": \"DOWN\"\n");
+            sb.append("    \"status\": \"DOWN\"");
         }
     }
 
@@ -854,8 +854,9 @@ public class MainHttpServer extends ServiceSupport 
implements CamelContextAware,
                 }
                 sb.append("\n");
             }
-            sb.append("            }\n");
+            sb.append("            }");
         }
+        sb.append("\n");
     }
 
     private static String allCausedByErrorMessages(Throwable e) {
diff --git 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
index d3f80dbbec1..9063452af11 100644
--- 
a/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
+++ 
b/components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java
@@ -630,9 +630,9 @@ public class ManagementHttpServer extends ServiceSupport 
implements CamelContext
 
     private static void healthCheckStatus(StringBuilder sb, boolean up) {
         if (up) {
-            sb.append("    \"status\": \"UP\"\n");
+            sb.append("    \"status\": \"UP\"");
         } else {
-            sb.append("    \"status\": \"DOWN\"\n");
+            sb.append("    \"status\": \"DOWN\"");
         }
     }
 
@@ -697,8 +697,9 @@ public class ManagementHttpServer extends ServiceSupport 
implements CamelContext
                 }
                 sb.append("\n");
             }
-            sb.append("            }\n");
+            sb.append("            }");
         }
+        sb.append("\n");
     }
 
     private static String allCausedByErrorMessages(Throwable e) {
diff --git 
a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java 
b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
index 757ed18f023..1aa95e34c7b 100644
--- a/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
+++ b/core/camel-main/src/main/java/org/apache/camel/main/BaseMainSupport.java
@@ -1444,12 +1444,6 @@ public abstract class BaseMainSupport extends 
BaseService {
                     mainConfigurationProperties.isAutoConfigurationFailFast(), 
true, autoConfiguredProperties);
             camelContext.setRestConfiguration(rest);
         }
-        if (!httpServerProperties.isEmpty() || 
mainConfigurationProperties.hasHttpServerConfiguration()) {
-            LOG.debug("Auto-configuring HTTP Server from loaded properties: 
{}", httpServerProperties.size());
-            setHttpServerProperties(camelContext, httpServerProperties,
-                    mainConfigurationProperties.isAutoConfigurationFailFast(),
-                    autoConfiguredProperties);
-        }
         if (!httpManagementServerProperties.isEmpty() || 
mainConfigurationProperties.hasHttpManagementServerConfiguration()) {
             LOG.debug("Auto-configuring HTTP Management Server from loaded 
properties: {}",
                     httpManagementServerProperties.size());
@@ -1457,6 +1451,12 @@ public abstract class BaseMainSupport extends 
BaseService {
                     mainConfigurationProperties.isAutoConfigurationFailFast(),
                     autoConfiguredProperties);
         }
+        if (!httpServerProperties.isEmpty() || 
mainConfigurationProperties.hasHttpServerConfiguration()) {
+            LOG.debug("Auto-configuring HTTP Server from loaded properties: 
{}", httpServerProperties.size());
+            setHttpServerProperties(camelContext, httpServerProperties,
+                    mainConfigurationProperties.isAutoConfigurationFailFast(),
+                    autoConfiguredProperties);
+        }
         if (!threadPoolProperties.isEmpty() || 
mainConfigurationProperties.hasThreadPoolConfiguration()) {
             LOG.debug("Auto-configuring Thread Pool from loaded properties: 
{}", threadPoolProperties.size());
             MainSupportModelConfigurer.setThreadPoolProperties(camelContext, 
mainConfigurationProperties, threadPoolProperties,

Reply via email to