From 5b94b6a86bd29eca3d53a24fa8c01cb9dad1d436 Mon Sep 17 00:00:00 2001 From: Croway Date: Fri, 29 Nov 2024 16:31:21 +0100 Subject: [PATCH] Fix platform-http reload issues --- .../platform/http/springboot/CamelRequestHandlerMapping.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/CamelRequestHandlerMapping.java b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/CamelRequestHandlerMapping.java index b528eecd3b1..33f43b30e8f 100644 --- a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/CamelRequestHandlerMapping.java +++ b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/CamelRequestHandlerMapping.java @@ -79,6 +79,9 @@ public void registerHttpEndpoint(HttpEndpointModel model) { Method m = ReflectionHelper.findMethod(SpringBootPlatformHttpConsumer.class, "service", HttpServletRequest.class, HttpServletResponse.class); for (RequestMappingInfo info : requestMappingInfos) { + // Needed in case of context reload + unregisterMapping(info); + registerMapping(info, model.getConsumer(), m); } }