This is an automated email from the ASF dual-hosted git repository.
gnodet pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new d7d311976be9 [backport camel-4.18.x] CAMEL-25462:
camel-platform-http-main - management settings ignored on a shared server port
(#28233)
d7d311976be9 is described below
commit d7d311976be996e5560a24826ca0cbbc997dc937
Author: Andrea Cosentino <[email protected]>
AuthorDate: Wed Oct 21 14:25:57 2026 +0200
[backport camel-4.18.x] CAMEL-25462: camel-platform-http-main - management
settings ignored on a shared server port (#28233)
CAMEL-25462: camel-platform-http-main - management settings ignored on a
shared server port (#28175)
Ported from commit 2f05680c95628806af7040fc2c5acf52c106a1d1: the KameletMain
part is left out, as camel run --mcp does not exist on this branch.
Signed-off-by: Andrea Cosentino <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
---
.../main/camel-main-configuration-metadata.json | 2 +-
.../src/main/docs/platform-http-main.adoc | 22 +++
.../platform/http/main/ManagementHttpServer.java | 38 +++++
.../main/ManagementHttpServerSharedPortTest.java | 185 +++++++++++++++++++++
.../camel-main-configuration-metadata.json | 2 +-
core/camel-main/src/main/docs/main.adoc | 2 +-
...ttpManagementServerConfigurationProperties.java | 8 +
7 files changed, 256 insertions(+), 3 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
index 7a4973537e9b..eda37efa6916 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json
@@ -217,7 +217,7 @@
{ "name": "camel.management.jwtKeystoreType", "required": false,
"description": "Type of the keystore used for JWT tokens validation (jks,
pkcs12, etc.).", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"string", "javaType": "java.lang.String", "secret": false },
{ "name": "camel.management.metricsEnabled", "required": false,
"description": "Whether to enable metrics. If enabled then you can access
metrics on context-path: \/observe\/metrics", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false },
{ "name": "camel.management.path", "required": false, "description":
"Context-path to use for embedded HTTP server", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"string", "javaType": "java.lang.String", "defaultValue": "\/", "secret": false
},
- { "name": "camel.management.port", "required": false, "description": "Port
to use for binding embedded HTTP management server. Use 0 to dynamic assign a
free random port number.", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"integer", "javaType": "int", "defaultValue": 8080, "secret": false },
+ { "name": "camel.management.port", "required": false, "description": "Port
to use for binding embedded HTTP management server. Use 0 to dynamic assign a
free random port number. When the embedded HTTP server is enabled with the same
port (both default to 8080), the management endpoints are served by the HTTP
server, which cannot apply a host, path, SSL or authentication of the
management server's own. The management server then fails to start when such a
setting is configured. Use a [...]
{ "name": "camel.management.sendEnabled", "required": false,
"description": "Whether to enable sending messages to Camel via HTTP. This
makes it possible to use Camel to send messages to Camel endpoint URIs via
HTTP.", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false },
{ "name": "camel.management.uploadEnabled", "required": false,
"description": "Whether to enable file upload via HTTP (not intended for
production use). This functionality is for development to be able to reload
Camel routes and code with source changes (if reload is enabled). If enabled
then you can upload\/delete files via HTTP PUT\/DELETE on context-path:
\/q\/upload\/{name}. You must also configure the uploadSourceDir option.",
"sourceType": "org.apache.camel.main.HttpManagementS [...]
{ "name": "camel.management.uploadSourceDir", "required": false,
"description": "Source directory when upload is enabled.", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"string", "javaType": "java.lang.String", "secret": false },
diff --git
a/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc
b/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc
index 141c11e4da03..afb5eaee26ff 100644
--- a/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc
+++ b/components/camel-platform-http-main/src/main/docs/platform-http-main.adoc
@@ -42,6 +42,28 @@ These features are as follows:
You configure these features in the `application.properties` file using the
`camel.server.xxx` and `camel.management.xxx` options.
+== Sharing the port with the management server
+
+The management features (`/observe/...` and `/q/...`) are served by the HTTP
management server (`camel.management.enabled=true`).
+When the HTTP server is enabled as well and both have the same port
(`camel.server.port` and `camel.management.port` both default to 8080),
+the management server does not start a server of its own. The HTTP server
serves the management endpoints instead, with its own host, path,
+SSL and authentication. For example, authentication configured on the HTTP
server for `/*` applies to the management endpoints too.
+
+The HTTP server cannot apply the host, path, SSL
(`useGlobalSslContextParameters`) or authentication options of the management
server.
+Camel therefore fails to start when the management server shares the port and
one of them is configured
+(a host or path equal to the one of the HTTP server is accepted). Give the
management server a port of its own to apply them:
+
+[source,properties]
+----
+camel.server.enabled=true
+camel.server.port=8080
+
+camel.management.enabled=true
+camel.management.port=8081
+camel.management.host=127.0.0.1
+camel.management.healthCheckEnabled=true
+----
+
== JWT authentication
The embedded HTTP server can validate JWT bearer tokens on incoming requests.
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 a51a9983bc1d..16fb2c77727a 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
@@ -29,6 +29,7 @@ import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
import java.util.Optional;
import java.util.Set;
import java.util.StringJoiner;
@@ -397,6 +398,7 @@ public class ManagementHttpServer extends ServiceSupport
implements CamelContext
VertxPlatformHttpServer mainServer =
camelContext.hasService(VertxPlatformHttpServer.class);
if (mainServer != null && mainServer.getConfigurationPort() ==
configuration.getPort()) {
// reuse main server as we should use same port
+ checkSettingsApplyOnSharedServer(mainServer);
server = mainServer;
} else {
server = new VertxPlatformHttpServer(configuration);
@@ -413,6 +415,42 @@ public class ManagementHttpServer extends ServiceSupport
implements CamelContext
ServiceHelper.initService(pluginRegistry);
}
+ /**
+ * On a shared port the management endpoints are added to the main server,
which keeps its own host, path, SSL and
+ * authentication. Fail instead of ignoring the management server settings
it cannot apply.
+ */
+ private void checkSettingsApplyOnSharedServer(VertxPlatformHttpServer
mainServer) {
+ List<String> ignored = new ArrayList<>();
+ String host = configuration.getBindHost();
+ if
(!VertxPlatformHttpServerConfiguration.DEFAULT_BIND_HOST.equals(host)
+ && !Objects.equals(host, mainServer.getHost())) {
+ ignored.add("camel.management.host=" + host + " (the HTTP server
binds to " + mainServer.getHost() + ")");
+ }
+ String path = configuration.getPath();
+ if (!VertxPlatformHttpServerConfiguration.DEFAULT_PATH.equals(path)
+ && !Objects.equals(path, mainServer.getPath())) {
+ ignored.add("camel.management.path=" + path + " (the HTTP server
uses " + mainServer.getPath() + ")");
+ }
+ if (configuration.getSslContextParameters() != null) {
+ ignored.add("sslContextParameters (the HTTP server uses its own
SSL configuration)");
+ } else if (configuration.isUseGlobalSslContextParameters() &&
!mainServer.isUseGlobalSslContextParameters()) {
+ ignored.add("camel.management.useGlobalSslContextParameters=true
(the HTTP server does not use the global SSL"
+ + " configuration)");
+ }
+ if (configuration.getAuthenticationConfig().isEnabled()) {
+ ignored.add("authentication
(camel.management.authenticationEnabled)");
+ }
+ if (!ignored.isEmpty()) {
+ throw new IllegalArgumentException(
+ "The HTTP management server uses the same port " +
configuration.getPort()
+ + " as the HTTP server, which
serves the management endpoints but cannot apply"
+ + " these management server
settings: " + String.join(", ", ignored)
+ + ". Set camel.management.port
to another port so that the management server"
+ + " applies them, or remove
them and configure the HTTP server (camel.server.*)"
+ + " instead.");
+ }
+ }
+
@Override
protected void doStart() throws Exception {
ObjectHelper.notNull(camelContext, "CamelContext");
diff --git
a/components/camel-platform-http-main/src/test/java/org/apache/camel/component/platform/http/main/ManagementHttpServerSharedPortTest.java
b/components/camel-platform-http-main/src/test/java/org/apache/camel/component/platform/http/main/ManagementHttpServerSharedPortTest.java
new file mode 100644
index 000000000000..803d9dd4ab94
--- /dev/null
+++
b/components/camel-platform-http-main/src/test/java/org/apache/camel/component/platform/http/main/ManagementHttpServerSharedPortTest.java
@@ -0,0 +1,185 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.camel.component.platform.http.main;
+
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import java.nio.charset.StandardCharsets;
+import java.util.Base64;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServer;
+import
org.apache.camel.component.platform.http.vertx.VertxPlatformHttpServerConfiguration;
+import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.main.Main;
+import org.apache.camel.support.jsse.SSLContextParameters;
+import org.apache.camel.test.AvailablePortFinder;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * The management server shares the HTTP server when both have the same port,
and the HTTP server then serves the
+ * management endpoints with its own host, path, SSL and authentication.
+ */
+class ManagementHttpServerSharedPortTest {
+
+ @RegisterExtension
+ AvailablePortFinder.Port port = AvailablePortFinder.find();
+
+ @RegisterExtension
+ AvailablePortFinder.Port managementPort = AvailablePortFinder.find();
+
+ private Main main;
+
+ @AfterEach
+ void stopMain() {
+ if (main != null) {
+ main.stop();
+ }
+ }
+
+ @Test
+ void sharedPortServesManagementEndpointsOnTheHttpServer() throws Exception
{
+ createMain().start();
+
+ assertEquals(200, get("localhost", port.getPort(), "/observe/info",
null).statusCode());
+ }
+
+ @Test
+ void sharedPortAcceptsTheHostAndPathOfTheHttpServer() throws Exception {
+ createMain("camel.server.host", "127.0.0.1", "camel.management.host",
"127.0.0.1",
+ "camel.server.path", "/app", "camel.management.path",
"/app").start();
+
+ assertEquals(200, get("127.0.0.1", port.getPort(),
"/app/observe/info", null).statusCode());
+ }
+
+ @Test
+ void sharedPortAppliesTheAuthenticationOfTheHttpServer() throws Exception {
+ createMain("camel.server.authenticationEnabled", "true",
"camel.server.authenticationPath", "/*",
+ "camel.server.basicPropertiesFile",
"camel-platform-http-vertx-auth.properties").start();
+
+ assertEquals(401, get("localhost", port.getPort(), "/observe/info",
null).statusCode());
+ assertEquals(200, get("localhost", port.getPort(), "/observe/info",
"camel:propertiesPass").statusCode());
+ }
+
+ @Test
+ void sharedPortRejectsAnotherManagementHost() {
+ createMain("camel.management.host", "127.0.0.1");
+
+ String message = startFailure();
+ assertTrue(message.contains("camel.management.host=127.0.0.1"),
message);
+ assertTrue(message.contains("camel.management.port"), message);
+ }
+
+ @Test
+ void sharedPortRejectsAnotherManagementPath() {
+ createMain("camel.management.path", "/management");
+
+ String message = startFailure();
+ assertTrue(message.contains("camel.management.path=/management"),
message);
+ }
+
+ @Test
+ void sharedPortRejectsManagementGlobalSsl() {
+ createMain("camel.management.useGlobalSslContextParameters", "true");
+
+ String message = startFailure();
+
assertTrue(message.contains("camel.management.useGlobalSslContextParameters=true"),
message);
+ }
+
+ @Test
+ void sharedPortRejectsManagementAuthentication() {
+ createMain("camel.management.authenticationEnabled", "true",
+ "camel.management.basicPropertiesFile",
"camel-platform-http-vertx-auth.properties");
+
+ String message = startFailure();
+ assertTrue(message.contains("camel.management.authenticationEnabled"),
message);
+ }
+
+ @Test
+ void sharedPortRejectsManagementSslContextParameters() throws Exception {
+ // only set programmatically: camel-main has no option for it
+ try (CamelContext context = new DefaultCamelContext()) {
+ VertxPlatformHttpServerConfiguration configuration = new
VertxPlatformHttpServerConfiguration();
+ configuration.setBindPort(port.getPort());
+ context.addService(new VertxPlatformHttpServer(configuration));
+
+ ManagementHttpServer server = new ManagementHttpServer();
+ server.setCamelContext(context);
+ server.setPort(port.getPort());
+ server.setSslContextParameters(new SSLContextParameters());
+
+ IllegalArgumentException e =
assertThrows(IllegalArgumentException.class, server::init);
+ assertTrue(e.getMessage().contains("sslContextParameters (the HTTP
server uses its own SSL configuration)"),
+ e.getMessage());
+ }
+ }
+
+ @Test
+ void ownPortAppliesTheManagementSettings() throws Exception {
+ createMain("camel.management.port",
Integer.toString(managementPort.getPort()),
+ "camel.management.host", "127.0.0.1", "camel.management.path",
"/management",
+ "camel.management.authenticationEnabled", "true",
+ "camel.management.basicPropertiesFile",
"camel-platform-http-vertx-auth.properties").start();
+
+ assertEquals(401, get("127.0.0.1", managementPort.getPort(),
"/management/observe/info", null).statusCode());
+ assertEquals(200,
+ get("127.0.0.1", managementPort.getPort(),
"/management/observe/info", "camel:propertiesPass")
+ .statusCode());
+ assertEquals(404, get("localhost", port.getPort(), "/observe/info",
null).statusCode());
+ }
+
+ private Main createMain(String... properties) {
+ main = new Main();
+ main.addOverrideProperty("camel.server.enabled", "true");
+ main.addOverrideProperty("camel.server.port",
Integer.toString(port.getPort()));
+ main.addOverrideProperty("camel.management.enabled", "true");
+ main.addOverrideProperty("camel.management.port",
Integer.toString(port.getPort()));
+ main.addOverrideProperty("camel.management.infoEnabled", "true");
+ for (int i = 0; i < properties.length; i += 2) {
+ main.addOverrideProperty(properties[i], properties[i + 1]);
+ }
+ return main;
+ }
+
+ private String startFailure() {
+ Exception e = assertThrows(Exception.class, main::start);
+ Throwable cause = e;
+ while (cause != null && !(cause instanceof IllegalArgumentException)) {
+ cause = cause.getCause();
+ }
+ assertNotNull(cause, "Expected an IllegalArgumentException, got: " +
e);
+ return cause.getMessage();
+ }
+
+ private static HttpResponse<String> get(String host, int port, String
path, String credentials) throws Exception {
+ HttpRequest.Builder request =
HttpRequest.newBuilder().uri(URI.create("http://" + host + ":" + port + path));
+ if (credentials != null) {
+ request.header("Authorization",
+ "Basic " +
Base64.getEncoder().encodeToString(credentials.getBytes(StandardCharsets.UTF_8)));
+ }
+ return HttpClient.newHttpClient().send(request.build(),
HttpResponse.BodyHandlers.ofString());
+ }
+}
diff --git
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
index 7a4973537e9b..eda37efa6916 100644
---
a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
+++
b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json
@@ -217,7 +217,7 @@
{ "name": "camel.management.jwtKeystoreType", "required": false,
"description": "Type of the keystore used for JWT tokens validation (jks,
pkcs12, etc.).", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"string", "javaType": "java.lang.String", "secret": false },
{ "name": "camel.management.metricsEnabled", "required": false,
"description": "Whether to enable metrics. If enabled then you can access
metrics on context-path: \/observe\/metrics", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false },
{ "name": "camel.management.path", "required": false, "description":
"Context-path to use for embedded HTTP server", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"string", "javaType": "java.lang.String", "defaultValue": "\/", "secret": false
},
- { "name": "camel.management.port", "required": false, "description": "Port
to use for binding embedded HTTP management server. Use 0 to dynamic assign a
free random port number.", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"integer", "javaType": "int", "defaultValue": 8080, "secret": false },
+ { "name": "camel.management.port", "required": false, "description": "Port
to use for binding embedded HTTP management server. Use 0 to dynamic assign a
free random port number. When the embedded HTTP server is enabled with the same
port (both default to 8080), the management endpoints are served by the HTTP
server, which cannot apply a host, path, SSL or authentication of the
management server's own. The management server then fails to start when such a
setting is configured. Use a [...]
{ "name": "camel.management.sendEnabled", "required": false,
"description": "Whether to enable sending messages to Camel via HTTP. This
makes it possible to use Camel to send messages to Camel endpoint URIs via
HTTP.", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"boolean", "javaType": "boolean", "defaultValue": false, "secret": false },
{ "name": "camel.management.uploadEnabled", "required": false,
"description": "Whether to enable file upload via HTTP (not intended for
production use). This functionality is for development to be able to reload
Camel routes and code with source changes (if reload is enabled). If enabled
then you can upload\/delete files via HTTP PUT\/DELETE on context-path:
\/q\/upload\/{name}. You must also configure the uploadSourceDir option.",
"sourceType": "org.apache.camel.main.HttpManagementS [...]
{ "name": "camel.management.uploadSourceDir", "required": false,
"description": "Source directory when upload is enabled.", "sourceType":
"org.apache.camel.main.HttpManagementServerConfigurationProperties", "type":
"string", "javaType": "java.lang.String", "secret": false },
diff --git a/core/camel-main/src/main/docs/main.adoc
b/core/camel-main/src/main/docs/main.adoc
index f525c7652cb2..428838b94a77 100644
--- a/core/camel-main/src/main/docs/main.adoc
+++ b/core/camel-main/src/main/docs/main.adoc
@@ -245,7 +245,7 @@ The camel.management supports 26 options, which are listed
below.
| *camel.management.jwtKeystore{zwsp}Type* | Type of the keystore used for JWT
tokens validation (jks, pkcs12, etc.). | | String
| *camel.management.metrics{zwsp}Enabled* | Whether to enable metrics. If
enabled then you can access metrics on context-path: /observe/metrics | false |
boolean
| *camel.management.path* | Context-path to use for embedded HTTP server | / |
String
-| *camel.management.port* | Port to use for binding embedded HTTP management
server. Use 0 to dynamic assign a free random port number. | 8080 | int
+| *camel.management.port* | Port to use for binding embedded HTTP management
server. Use 0 to dynamic assign a free random port number. When the embedded
HTTP server is enabled with the same port (both default to 8080), the
management endpoints are served by the HTTP server, which cannot apply a host,
path, SSL or authentication of the management server's own. The management
server then fails to start when such a setting is configured. Use a different
port to apply it. | 8080 | int
| *camel.management.sendEnabled* | Whether to enable sending messages to Camel
via HTTP. This makes it possible to use Camel to send messages to Camel
endpoint URIs via HTTP. | false | boolean
| *camel.management.uploadEnabled* | Whether to enable file upload via HTTP
(not intended for production use). This functionality is for development to be
able to reload Camel routes and code with source changes (if reload is
enabled). If enabled then you can upload/delete files via HTTP PUT/DELETE on
context-path: /q/upload/\{name}. You must also configure the uploadSourceDir
option. | false | boolean
| *camel.management.uploadSource{zwsp}Dir* | Source directory when upload is
enabled. | | String
diff --git
a/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java
b/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java
index 4da440fdf466..bf4cdd4296bb 100644
---
a/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java
+++
b/core/camel-main/src/main/java/org/apache/camel/main/HttpManagementServerConfigurationProperties.java
@@ -115,6 +115,10 @@ public class HttpManagementServerConfigurationProperties
implements BootstrapClo
/**
* Port to use for binding embedded HTTP management server. Use 0 to
dynamic assign a free random port number.
+ *
+ * When the embedded HTTP server is enabled with the same port (both
default to 8080), the management endpoints are
+ * served by the HTTP server, which cannot apply a host, path, SSL or
authentication of the management server's own.
+ * The management server then fails to start when such a setting is
configured. Use a different port to apply it.
*/
public void setPort(int port) {
this.port = port;
@@ -403,6 +407,10 @@ public class HttpManagementServerConfigurationProperties
implements BootstrapClo
/**
* Port to use for binding embedded HTTP management server. Use 0 to
dynamic assign a free random port number.
+ *
+ * When the embedded HTTP server is enabled with the same port (both
default to 8080), the management endpoints are
+ * served by the HTTP server, which cannot apply a host, path, SSL or
authentication of the management server's own.
+ * The management server then fails to start when such a setting is
configured. Use a different port to apply it.
*/
public HttpManagementServerConfigurationProperties withPort(int port) {
this.port = port;