Adapt to breaking API change in Micrometer

See gh-37703
pull/37813/head
Andy Wilkinson 1 year ago
parent 1d410dccea
commit 5280cfeec0

@ -37,7 +37,7 @@ dependencies {
optional("io.dropwizard.metrics:metrics-jmx")
optional("io.lettuce:lettuce-core")
optional("io.micrometer:micrometer-observation")
optional("io.micrometer:micrometer-core")
optional("io.micrometer:micrometer-jakarta9")
optional("io.micrometer:micrometer-tracing")
optional("io.micrometer:micrometer-tracing-bridge-brave")
optional("io.micrometer:micrometer-tracing-bridge-otel")

@ -16,7 +16,7 @@
package org.springframework.boot.actuate.autoconfigure.observation.jms;
import io.micrometer.core.instrument.binder.jms.JmsPublishObservationContext;
import io.micrometer.jakarta9.instrument.jms.JmsPublishObservationContext;
import io.micrometer.observation.Observation;
import io.micrometer.observation.ObservationRegistry;
import jakarta.jms.Message;

@ -51,8 +51,8 @@ class JmsTemplateObservationAutoConfigurationTests {
}
@Test
void shouldBackOffWhenMircrometerCoreIsNotPresent() {
this.contextRunner.withClassLoader(new FilteredClassLoader("io.micrometer.core")).run((context) -> {
void shouldBackOffWhenMicrometerJakartaIsNotPresent() {
this.contextRunner.withClassLoader(new FilteredClassLoader("io.micrometer.jakarta")).run((context) -> {
JmsTemplate jmsTemplate = context.getBean(JmsTemplate.class);
assertThat(jmsTemplate).extracting("observationRegistry").isNull();
});

@ -22,7 +22,7 @@ dependencies {
optional("com.zaxxer:HikariCP")
optional("io.lettuce:lettuce-core")
optional("io.micrometer:micrometer-observation")
optional("io.micrometer:micrometer-core")
optional("io.micrometer:micrometer-jakarta9")
optional("io.micrometer:micrometer-tracing")
optional("io.micrometer:micrometer-registry-prometheus")
optional("io.prometheus:simpleclient_pushgateway") {

@ -89,7 +89,7 @@ dependencies {
implementation(project(path: ":spring-boot-project:spring-boot-devtools"))
implementation("ch.qos.logback:logback-classic")
implementation("com.zaxxer:HikariCP")
implementation("io.micrometer:micrometer-core")
implementation("io.micrometer:micrometer-jakarta9")
implementation("io.micrometer:micrometer-tracing")
implementation("io.micrometer:micrometer-registry-graphite")
implementation("io.micrometer:micrometer-registry-jmx")

@ -1,5 +1,5 @@
/*
* Copyright 2012-2022 the original author or authors.
* Copyright 2012-2023 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration
import org.springframework.http.client.reactive.ClientHttpConnector
import org.springframework.http.client.reactive.ReactorClientHttpConnector
import org.springframework.http.client.reactive.ReactorResourceFactory
import org.springframework.http.client.ReactorResourceFactory
import reactor.netty.http.client.HttpClient
@Configuration(proxyBeanMethods = false)

@ -8,5 +8,5 @@ dependencies {
api(project(":spring-boot-project:spring-boot-starters:spring-boot-starter"))
api(project(":spring-boot-project:spring-boot-actuator-autoconfigure"))
api("io.micrometer:micrometer-observation")
api("io.micrometer:micrometer-core")
api("io.micrometer:micrometer-jakarta9")
}

Loading…
Cancel
Save