OkapiMicrometerAutoConfiguration's @ConditionalOnClass only guards on io.micrometer.core.instrument.MeterRegistry, not on any class from okapi-micrometer itself. Since MeterRegistry commonly arrives via Spring Boot Actuator independently of okapi-micrometer, an app with Actuator but without the okapi-micrometer dependency hits NoClassDefFoundError at context startup, because the autoconfiguration class directly references MicrometerOutboxListener/MicrometerOutboxMetrics/OutboxMetricsRefresher.
Fix: add MicrometerOutboxListener to the class-level @ConditionalOnClass, so the whole autoconfiguration is skipped (not just attempted and failed) when okapi-micrometer isn't on the classpath.
OkapiMicrometerAutoConfiguration's@ConditionalOnClassonly guards onio.micrometer.core.instrument.MeterRegistry, not on any class from okapi-micrometer itself. SinceMeterRegistrycommonly arrives via Spring Boot Actuator independently of okapi-micrometer, an app with Actuator but without the okapi-micrometer dependency hitsNoClassDefFoundErrorat context startup, because the autoconfiguration class directly referencesMicrometerOutboxListener/MicrometerOutboxMetrics/OutboxMetricsRefresher.Fix: add
MicrometerOutboxListenerto the class-level@ConditionalOnClass, so the whole autoconfiguration is skipped (not just attempted and failed) when okapi-micrometer isn't on the classpath.