ammachado commented on code in PR #31225:
URL: https://github.com/apache/camel/pull/31225#discussion_r4765156445
##########
components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/MainHttpServer.java:
##########
@@ -221,11 +226,20 @@ protected void doStart() throws Exception {
String routerName =
VertxPlatformHttpRouter.getRouterNameFromPort(getPort());
router = VertxPlatformHttpRouter.lookup(camelContext, routerName);
platformHttpComponent = camelContext.getComponent("platform-http",
PlatformHttpComponent.class);
+ // tell the dev console where the endpoints are served
+ platformHttpComponent.setServerUrl(server.getScheme() + "://0.0.0.0:"
+ server.getPort());
setupConsoles();
setupStartupSummary();
}
+ @Override
+ protected void doStop() throws Exception {
+ if (platformHttpComponent != null) {
+ platformHttpComponent.setServerUrl(null);
+ }
+ }
Review Comment:
Done in e1c190cc4d4f: `doStop()` now calls `super.doStop()` after clearing
the URL.
_Claude Code on behalf of Adriano Machado (@ammachado)_
_This was generated by an AI agent and may contain inaccuracies. Please
verify before relying on it._
##########
components/camel-platform-http-main/src/main/java/org/apache/camel/component/platform/http/main/ManagementHttpServer.java:
##########
@@ -493,11 +493,20 @@ protected void doStart() throws Exception {
String routerName =
VertxPlatformHttpRouter.getRouterNameFromPort(getPort());
router = VertxPlatformHttpRouter.lookup(camelContext, routerName);
platformHttpComponent = camelContext.getComponent("platform-http",
PlatformHttpComponent.class);
+ // tell the dev console where the endpoints are served
+ platformHttpComponent.setManagementServerUrl(server.getScheme() +
"://0.0.0.0:" + server.getPort());
setupConsoles();
setupStartupSummary();
}
+ @Override
+ protected void doStop() throws Exception {
+ if (platformHttpComponent != null) {
+ platformHttpComponent.setManagementServerUrl(null);
+ }
+ }
Review Comment:
Done in e1c190cc4d4f: `doStop()` now calls `super.doStop()` after clearing
the URL.
_Claude Code on behalf of Adriano Machado (@ammachado)_
_This was generated by an AI agent and may contain inaccuracies. Please
verify before relying on it._
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]