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

Croway pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git


The following commit(s) were added to refs/heads/main by this push:
     new d244c4dd6e6 CAMEL-24057: check actually-used classes in 
@ConditionalOnClass for access log configurations
d244c4dd6e6 is described below

commit d244c4dd6e6b9dd3033b21b0d227ac2dae76bfac
Author: Croway <[email protected]>
AuthorDate: Tue Jul 14 10:54:26 2026 +0200

    CAMEL-24057: check actually-used classes in @ConditionalOnClass for access 
log configurations
---
 .../springboot/customizer/UndertowAccessLogConfiguration.java |  6 +++++-
 .../actuate/accesslog/ManagementAccessLogConfiguration.java   | 11 +++++++++--
 2 files changed, 14 insertions(+), 3 deletions(-)

diff --git 
a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/customizer/UndertowAccessLogConfiguration.java
 
b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/customizer/UndertowAccessLogConfiguration.java
index bd71893893c..ee71f4cb855 100644
--- 
a/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/customizer/UndertowAccessLogConfiguration.java
+++ 
b/components-starter/camel-platform-http-starter/src/main/java/org/apache/camel/component/platform/http/springboot/customizer/UndertowAccessLogConfiguration.java
@@ -35,7 +35,11 @@ import org.springframework.core.env.Environment;
  */
 @Configuration(proxyBeanMethods = false)
 @EnableConfigurationProperties(UndertowAccessLogProperties.class)
-@ConditionalOnClass(name = "io.undertow.Undertow")
+@ConditionalOnClass(name = {
+    "io.undertow.Undertow",
+    "io.undertow.server.handlers.accesslog.AccessLogHandler",
+    "io.undertow.server.handlers.accesslog.JBossLoggingAccessLogReceiver"
+})
 @ConditionalOnProperties( {
     @ConditionalOnProperty(name = "server.undertow.accesslog.enabled", 
havingValue = "false"),
     @ConditionalOnProperty(name = 
"camel.component.platform-http.server.undertow.accesslog.use-camel-logging", 
havingValue = "true"),
diff --git 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/accesslog/ManagementAccessLogConfiguration.java
 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/accesslog/ManagementAccessLogConfiguration.java
index 0a2022408f8..8d2f4e5d32d 100644
--- 
a/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/accesslog/ManagementAccessLogConfiguration.java
+++ 
b/core/camel-spring-boot/src/main/java/org/apache/camel/spring/boot/actuate/accesslog/ManagementAccessLogConfiguration.java
@@ -47,7 +47,11 @@ public class ManagementAccessLogConfiguration {
      * Undertow-specific configuration.
      */
     @Configuration(proxyBeanMethods = false)
-    @ConditionalOnClass(name = "io.undertow.Undertow")
+    @ConditionalOnClass(name = {
+            "io.undertow.Undertow",
+            "io.undertow.server.handlers.accesslog.AccessLogHandler",
+            
"io.undertow.server.handlers.accesslog.JBossLoggingAccessLogReceiver"
+    })
     static class UndertowAccessLogCustomizerConfiguration {
 
         // TODO reintroduce once spring-boot-starter-undertow will be available
@@ -78,7 +82,10 @@ public class ManagementAccessLogConfiguration {
      * Tomcat-specific configuration to disable access logging in the 
management context.
      */
     @Configuration(proxyBeanMethods = false)
-    @ConditionalOnClass(name = "org.apache.catalina.startup.Tomcat")
+    @ConditionalOnClass(name = {
+            "org.apache.catalina.startup.Tomcat",
+            "org.apache.catalina.valves.AccessLogValve"
+    })
     @ConditionalOnProperty(name = "management.server.accesslog.enabled", 
havingValue = "false")
     static class TomcatAccessLogCustomizerConfiguration {
 

Reply via email to