Add boot42-upgrade module: Spring Boot 4.2.0 GA vs 4.1.3 upgrade checklist

Re-runs the RC1 checklist on GA and adds SSL-bundle options on the LDAP client,
the migrator fail switch, OpenTelemetry convention spellings, migrated
RestClient/RestTestClient, compiler removal warnings for RestTemplate,
TestRestTemplate and Pulsar, and jar/BOM probes. Transcripts in output/.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b5G8Z7wYEQnr5w4DfG
This commit is contained in:
Claude
2026-11-20 19:23:39 +00:00
parent da700a564f
commit c8845581e6
54 changed files with 1254 additions and 1 deletions
@@ -0,0 +1,65 @@
package com.ankurm.boot42up;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import io.micrometer.core.instrument.MeterRegistry;
import org.junit.jupiter.api.Test;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.web.client.RestClient;
import static org.assertj.core.api.Assertions.assertThat;
/**
* The reference documentation says management.observations.conventions=open-telemetry. On
* 4.2.0-RC1 that spelling failed to start. This starts the application once per spelling on the
* version under test and records whether it starts and which server HTTP meter it ends up with.
*/
class ConventionSpellingsTest {
@Test
void spellings() throws Exception {
Transcript t = new Transcript("09-conventions-spellings");
Map<String, String> outcome = new LinkedHashMap<>();
for (String value : List.of("open-telemetry", "opentelemetry", "OPEN_TELEMETRY", "micrometer")) {
String result;
try (ConfigurableApplicationContext ctx = new SpringApplicationBuilder(UpgradeApplication.class)
.web(WebApplicationType.SERVLET)
.properties("server.port=0", "spring.main.banner-mode=off",
"management.observations.conventions=" + value, "management.otlp.metrics.export.enabled=false",
"management.opentelemetry.tracing.export.otlp.enabled=false")
.run()) {
String port = ctx.getEnvironment().getProperty("local.server.port");
RestClient.create().get().uri("http://localhost:" + port + "/hello/x").retrieve().body(String.class);
MeterRegistry registry = ctx.getBean(MeterRegistry.class);
for (int i = 0; i < 100 && registry.getMeters().stream()
.noneMatch(m -> m.getId().getName().startsWith("http.server.request")
&& !m.getId().getName().endsWith(".active")); i++) {
Thread.sleep(50);
}
result = "starts, server meter: " + registry.getMeters().stream()
.map(m -> m.getId().getName())
.filter(n -> n.startsWith("http.server.request") && !n.endsWith(".active"))
.distinct()
.sorted()
.toList();
}
catch (Exception ex) {
result = "FAILS to start";
}
outcome.put(value, result);
t.line(String.format("%-16s -> %s", value, result));
}
t.write();
if (Transcript.is42()) {
assertThat(outcome.get("open-telemetry")).contains("http.server.request.duration");
assertThat(outcome.get("micrometer")).contains("http.server.requests");
}
else {
assertThat(outcome.get("micrometer")).contains("http.server.requests");
}
}
}