Skip to content

Commit b8e4ec3

Browse files
committed
Merge branch '3.4.x'
Closes gh-44973
2 parents c604eae + 7630c7c commit b8e4ec3

File tree

12 files changed

+79
-115
lines changed

12 files changed

+79
-115
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/opentelemetry/OpenTelemetryResourceAttributes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ public final class OpenTelemetryResourceAttributes {
5757
/**
5858
* Creates a new instance of {@link OpenTelemetryResourceAttributes}.
5959
* @param environment the environment
60-
* @param resourceAttributes user provided resource attributes to be used
60+
* @param resourceAttributes user-provided resource attributes to be used
6161
*/
6262
public OpenTelemetryResourceAttributes(Environment environment, Map<String, String> resourceAttributes) {
6363
this(environment, resourceAttributes, null);
@@ -66,7 +66,7 @@ public OpenTelemetryResourceAttributes(Environment environment, Map<String, Stri
6666
/**
6767
* Creates a new {@link OpenTelemetryResourceAttributes} instance.
6868
* @param environment the environment
69-
* @param resourceAttributes user provided resource attributes to be used
69+
* @param resourceAttributes user-provided resource attributes to be used
7070
* @param getEnv a function to retrieve environment variables by name
7171
*/
7272
OpenTelemetryResourceAttributes(Environment environment, Map<String, String> resourceAttributes,

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/cloudfoundry/reactive/ReactiveCloudFoundryActuatorAutoConfigurationTests.java

Lines changed: 57 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
import okhttp3.mockwebserver.MockResponse;
2929
import okhttp3.mockwebserver.MockWebServer;
30+
import org.assertj.core.api.InstanceOfAssertFactories;
3031
import org.junit.jupiter.api.AfterEach;
3132
import org.junit.jupiter.api.Test;
3233
import reactor.netty.http.HttpResources;
@@ -43,7 +44,6 @@
4344
import org.springframework.boot.actuate.endpoint.EndpointId;
4445
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
4546
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
46-
import org.springframework.boot.actuate.endpoint.web.EndpointMapping;
4747
import org.springframework.boot.actuate.endpoint.web.ExposableWebEndpoint;
4848
import org.springframework.boot.actuate.endpoint.web.WebOperation;
4949
import org.springframework.boot.actuate.endpoint.web.WebOperationRequestPredicate;
@@ -74,7 +74,6 @@
7474
import org.springframework.security.core.userdetails.User;
7575
import org.springframework.security.web.server.SecurityWebFilterChain;
7676
import org.springframework.security.web.server.WebFilterChainProxy;
77-
import org.springframework.test.util.ReflectionTestUtils;
7877
import org.springframework.test.web.reactive.server.WebTestClient;
7978
import org.springframework.web.cors.CorsConfiguration;
8079
import org.springframework.web.reactive.function.client.WebClient;
@@ -121,16 +120,16 @@ void cloudFoundryPlatformActive() {
121120
"vcap.application.cf_api:https://my-cloud-controller.com")
122121
.run((context) -> {
123122
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(context);
124-
EndpointMapping endpointMapping = (EndpointMapping) ReflectionTestUtils.getField(handlerMapping,
125-
"endpointMapping");
126-
assertThat(endpointMapping.getPath()).isEqualTo("/cloudfoundryapplication");
127-
CorsConfiguration corsConfiguration = (CorsConfiguration) ReflectionTestUtils.getField(handlerMapping,
128-
"corsConfiguration");
129-
assertThat(corsConfiguration.getAllowedOrigins()).contains("*");
130-
assertThat(corsConfiguration.getAllowedMethods())
131-
.containsAll(Arrays.asList(HttpMethod.GET.name(), HttpMethod.POST.name()));
132-
assertThat(corsConfiguration.getAllowedHeaders())
133-
.containsAll(Arrays.asList("Authorization", "X-Cf-App-Instance", "Content-Type"));
123+
assertThat(handlerMapping).extracting("endpointMapping.path").isEqualTo("/cloudfoundryapplication");
124+
assertThat(handlerMapping)
125+
.extracting("corsConfiguration", InstanceOfAssertFactories.type(CorsConfiguration.class))
126+
.satisfies((corsConfiguration) -> {
127+
assertThat(corsConfiguration.getAllowedOrigins()).contains("*");
128+
assertThat(corsConfiguration.getAllowedMethods())
129+
.containsAll(Arrays.asList(HttpMethod.GET.name(), HttpMethod.POST.name()));
130+
assertThat(corsConfiguration.getAllowedHeaders())
131+
.containsAll(Arrays.asList("Authorization", "X-Cf-App-Instance", "Content-Type"));
132+
});
134133
});
135134
}
136135

@@ -150,41 +149,27 @@ void cloudFoundryPlatformActiveSetsApplicationId() {
150149
this.contextRunner
151150
.withPropertyValues("VCAP_APPLICATION:---", "vcap.application.application_id:my-app-id",
152151
"vcap.application.cf_api:https://my-cloud-controller.com")
153-
.run((context) -> {
154-
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(context);
155-
Object interceptor = ReflectionTestUtils.getField(handlerMapping, "securityInterceptor");
156-
String applicationId = (String) ReflectionTestUtils.getField(interceptor, "applicationId");
157-
assertThat(applicationId).isEqualTo("my-app-id");
158-
});
152+
.run((context) -> assertThat(getHandlerMapping(context)).extracting("securityInterceptor.applicationId")
153+
.isEqualTo("my-app-id"));
159154
}
160155

161156
@Test
162157
void cloudFoundryPlatformActiveSetsCloudControllerUrl() {
163158
this.contextRunner
164159
.withPropertyValues("VCAP_APPLICATION:---", "vcap.application.application_id:my-app-id",
165160
"vcap.application.cf_api:https://my-cloud-controller.com")
166-
.run((context) -> {
167-
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(context);
168-
Object interceptor = ReflectionTestUtils.getField(handlerMapping, "securityInterceptor");
169-
Object interceptorSecurityService = ReflectionTestUtils.getField(interceptor,
170-
"cloudFoundrySecurityService");
171-
String cloudControllerUrl = (String) ReflectionTestUtils.getField(interceptorSecurityService,
172-
"cloudControllerUrl");
173-
assertThat(cloudControllerUrl).isEqualTo("https://my-cloud-controller.com");
174-
});
161+
.run((context) -> assertThat(getHandlerMapping(context))
162+
.extracting("securityInterceptor.cloudFoundrySecurityService.cloudControllerUrl")
163+
.isEqualTo("https://my-cloud-controller.com"));
175164
}
176165

177166
@Test
178167
void cloudFoundryPlatformActiveAndCloudControllerUrlNotPresent() {
179168
this.contextRunner.withPropertyValues("VCAP_APPLICATION:---", "vcap.application.application_id:my-app-id")
180-
.run((context) -> {
181-
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = context.getBean(
182-
"cloudFoundryWebFluxEndpointHandlerMapping", CloudFoundryWebFluxEndpointHandlerMapping.class);
183-
Object securityInterceptor = ReflectionTestUtils.getField(handlerMapping, "securityInterceptor");
184-
Object interceptorSecurityService = ReflectionTestUtils.getField(securityInterceptor,
185-
"cloudFoundrySecurityService");
186-
assertThat(interceptorSecurityService).isNull();
187-
});
169+
.run((context) -> assertThat(context.getBean("cloudFoundryWebFluxEndpointHandlerMapping",
170+
CloudFoundryWebFluxEndpointHandlerMapping.class))
171+
.extracting("securityInterceptor.cloudFoundrySecurityService")
172+
.isNull());
188173
}
189174

190175
@Test
@@ -194,30 +179,30 @@ void cloudFoundryPathsIgnoredBySpringSecurity() {
194179
.withPropertyValues("VCAP_APPLICATION:---", "vcap.application.application_id:my-app-id",
195180
"vcap.application.cf_api:https://my-cloud-controller.com")
196181
.run((context) -> {
197-
WebFilterChainProxy chainProxy = context.getBean(WebFilterChainProxy.class);
198-
List<SecurityWebFilterChain> filters = (List<SecurityWebFilterChain>) ReflectionTestUtils
199-
.getField(chainProxy, "filters");
200-
Boolean cfBaseRequestMatches = getMatches(filters, BASE_PATH);
201-
Boolean cfBaseWithTrailingSlashRequestMatches = getMatches(filters, BASE_PATH + "/");
202-
Boolean cfRequestMatches = getMatches(filters, BASE_PATH + "/test");
203-
Boolean cfRequestWithAdditionalPathMatches = getMatches(filters, BASE_PATH + "/test/a");
204-
Boolean otherCfRequestMatches = getMatches(filters, BASE_PATH + "/other-path");
205-
Boolean otherRequestMatches = getMatches(filters, "/some-other-path");
206-
assertThat(cfBaseRequestMatches).isTrue();
207-
assertThat(cfBaseWithTrailingSlashRequestMatches).isTrue();
208-
assertThat(cfRequestMatches).isTrue();
209-
assertThat(cfRequestWithAdditionalPathMatches).isTrue();
210-
assertThat(otherCfRequestMatches).isFalse();
211-
assertThat(otherRequestMatches).isFalse();
212-
otherRequestMatches = filters.get(1)
213-
.matches(MockServerWebExchange.from(MockServerHttpRequest.get("/some-other-path").build()))
214-
.block(Duration.ofSeconds(30));
215-
assertThat(otherRequestMatches).isTrue();
182+
assertThat(context.getBean(WebFilterChainProxy.class))
183+
.extracting("filters", InstanceOfAssertFactories.list(SecurityWebFilterChain.class))
184+
.satisfies((filters) -> {
185+
Boolean cfBaseRequestMatches = getMatches(filters, BASE_PATH);
186+
Boolean cfBaseWithTrailingSlashRequestMatches = getMatches(filters, BASE_PATH + "/");
187+
Boolean cfRequestMatches = getMatches(filters, BASE_PATH + "/test");
188+
Boolean cfRequestWithAdditionalPathMatches = getMatches(filters, BASE_PATH + "/test/a");
189+
Boolean otherCfRequestMatches = getMatches(filters, BASE_PATH + "/other-path");
190+
Boolean otherRequestMatches = getMatches(filters, "/some-other-path");
191+
assertThat(cfBaseRequestMatches).isTrue();
192+
assertThat(cfBaseWithTrailingSlashRequestMatches).isTrue();
193+
assertThat(cfRequestMatches).isTrue();
194+
assertThat(cfRequestWithAdditionalPathMatches).isTrue();
195+
assertThat(otherCfRequestMatches).isFalse();
196+
assertThat(otherRequestMatches).isFalse();
197+
otherRequestMatches = filters.get(1)
198+
.matches(MockServerWebExchange.from(MockServerHttpRequest.get("/some-other-path").build()))
199+
.block(Duration.ofSeconds(30));
200+
assertThat(otherRequestMatches).isTrue();
201+
});
216202
});
217-
218203
}
219204

220-
private static Boolean getMatches(List<SecurityWebFilterChain> filters, String urlTemplate) {
205+
private static Boolean getMatches(List<? extends SecurityWebFilterChain> filters, String urlTemplate) {
221206
return filters.get(0)
222207
.matches(MockServerWebExchange.from(MockServerHttpRequest.get(urlTemplate).build()))
223208
.block(Duration.ofSeconds(30));
@@ -322,20 +307,17 @@ void skipSslValidation() throws IOException {
322307
.withPropertyValues("VCAP_APPLICATION:---", "vcap.application.application_id:my-app-id",
323308
"vcap.application.cf_api:https://my-cloud-controller.com",
324309
"management.cloudfoundry.skip-ssl-validation:true")
325-
.run((context) -> {
326-
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(context);
327-
Object interceptor = ReflectionTestUtils.getField(handlerMapping, "securityInterceptor");
328-
Object interceptorSecurityService = ReflectionTestUtils.getField(interceptor,
329-
"cloudFoundrySecurityService");
330-
WebClient webClient = (WebClient) ReflectionTestUtils.getField(interceptorSecurityService,
331-
"webClient");
332-
ResponseEntity<Void> response = webClient.get()
333-
.uri(server.url("/").uri())
334-
.retrieve()
335-
.toBodilessEntity()
336-
.block(Duration.ofSeconds(30));
337-
assertThat(response.getStatusCode()).isEqualTo(HttpStatusCode.valueOf(204));
338-
});
310+
.run((context) -> assertThat(getHandlerMapping(context))
311+
.extracting("securityInterceptor.cloudFoundrySecurityService.webClient",
312+
InstanceOfAssertFactories.type(WebClient.class))
313+
.satisfies((webClient) -> {
314+
ResponseEntity<Void> response = webClient.get()
315+
.uri(server.url("/").uri())
316+
.retrieve()
317+
.toBodilessEntity()
318+
.block(Duration.ofSeconds(30));
319+
assertThat(response.getStatusCode()).isEqualTo(HttpStatusCode.valueOf(204));
320+
}));
339321
}
340322
}
341323

@@ -351,21 +333,16 @@ void sslValidationNotSkippedByDefault() throws IOException {
351333
this.contextRunner.withConfiguration(AutoConfigurations.of(HealthEndpointAutoConfiguration.class))
352334
.withPropertyValues("VCAP_APPLICATION:---", "vcap.application.application_id:my-app-id",
353335
"vcap.application.cf_api:https://my-cloud-controller.com")
354-
.run((context) -> {
355-
CloudFoundryWebFluxEndpointHandlerMapping handlerMapping = getHandlerMapping(context);
356-
Object interceptor = ReflectionTestUtils.getField(handlerMapping, "securityInterceptor");
357-
Object interceptorSecurityService = ReflectionTestUtils.getField(interceptor,
358-
"cloudFoundrySecurityService");
359-
WebClient webClient = (WebClient) ReflectionTestUtils.getField(interceptorSecurityService,
360-
"webClient");
361-
assertThatExceptionOfType(RuntimeException.class)
336+
.run((context) -> assertThat(getHandlerMapping(context))
337+
.extracting("securityInterceptor.cloudFoundrySecurityService.webClient",
338+
InstanceOfAssertFactories.type(WebClient.class))
339+
.satisfies((webClient) -> assertThatExceptionOfType(RuntimeException.class)
362340
.isThrownBy(() -> webClient.get()
363341
.uri(server.url("/").uri())
364342
.retrieve()
365343
.toBodilessEntity()
366344
.block(Duration.ofSeconds(30)))
367-
.withCauseInstanceOf(SSLException.class);
368-
});
345+
.withCauseInstanceOf(SSLException.class)));
369346
}
370347
}
371348

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/health/HealthEndpointAutoConfigurationTests.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,7 @@
5353
import org.springframework.boot.actuate.health.StatusAggregator;
5454
import org.springframework.boot.actuate.health.SystemHealth;
5555
import org.springframework.boot.autoconfigure.AutoConfigurations;
56-
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
5756
import org.springframework.boot.autoconfigure.web.servlet.DispatcherServletAutoConfiguration;
58-
import org.springframework.boot.logging.LogLevel;
5957
import org.springframework.boot.test.context.FilteredClassLoader;
6058
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
6159
import org.springframework.boot.test.context.runner.ReactiveWebApplicationContextRunner;
@@ -365,7 +363,6 @@ void additionalJerseyHealthEndpointsPathsTolerateHealthEndpointThatIsNotWebExpos
365363
.withClassLoader(new FilteredClassLoader(DispatcherServlet.class))
366364
.withPropertyValues("management.endpoints.web.exposure.exclude=*",
367365
"management.endpoints.cloudfoundry.exposure.include=*", "spring.main.cloud-platform=cloud_foundry")
368-
.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
369366
.run((context) -> {
370367
assertThat(context).hasSingleBean(JerseyAdditionalHealthEndpointPathsConfiguration.class);
371368
assertThat(context).hasNotFailed();

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/otlp/OtlpMetricsPropertiesConfigAdapterTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ void whenPropertiesUrlIsNotSetAdapterUrlReturnsDefault() {
6363
}
6464

6565
@Test
66-
void whenPropertiesUrlIsNotSetThanUseOtlpConfigUrlAsFallback() {
66+
void whenPropertiesUrlIsNotSetThenUseOtlpConfigUrlAsFallback() {
6767
assertThat(this.properties.getUrl()).isNull();
6868
OtlpMetricsPropertiesConfigAdapter adapter = spy(createAdapter());
6969
given(adapter.get("management.otlp.metrics.export.url")).willReturn("https://my-endpoint/v1/metrics");

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/JdbcProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static class Template {
4545

4646
/**
4747
* Whether to ignore JDBC statement warnings (SQLWarning). When set to false,
48-
* throw a SQLWarningException instead.
48+
* throw an SQLWarningException instead.
4949
*/
5050
private boolean ignoreWarnings = true;
5151

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ServerProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,7 +1156,7 @@ public enum UseApr {
11561156
WHEN_AVAILABLE,
11571157

11581158
/**
1159-
* Never user APR.
1159+
* Never use APR.
11601160
*/
11611161
NEVER
11621162

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/graphql/GraphQlAutoConfigurationTests.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535
import org.springframework.aot.hint.predicate.RuntimeHintsPredicates;
3636
import org.springframework.boot.autoconfigure.AutoConfigurations;
3737
import org.springframework.boot.autoconfigure.graphql.GraphQlAutoConfiguration.GraphQlResourcesRuntimeHints;
38-
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
3938
import org.springframework.boot.autoconfigure.task.TaskExecutionAutoConfiguration;
40-
import org.springframework.boot.logging.LogLevel;
4139
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
4240
import org.springframework.boot.test.system.CapturedOutput;
4341
import org.springframework.boot.test.system.OutputCaptureExtension;
@@ -89,12 +87,11 @@ class GraphQlAutoConfigurationTests {
8987

9088
@Test
9189
void shouldContributeDefaultBeans() {
92-
this.contextRunner.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
93-
.run((context) -> assertThat(context).hasSingleBean(GraphQlSource.class)
94-
.hasSingleBean(BatchLoaderRegistry.class)
95-
.hasSingleBean(ExecutionGraphQlService.class)
96-
.hasSingleBean(AnnotatedControllerConfigurer.class)
97-
.hasSingleBean(EncodingCursorStrategy.class));
90+
this.contextRunner.run((context) -> assertThat(context).hasSingleBean(GraphQlSource.class)
91+
.hasSingleBean(BatchLoaderRegistry.class)
92+
.hasSingleBean(ExecutionGraphQlService.class)
93+
.hasSingleBean(AnnotatedControllerConfigurer.class)
94+
.hasSingleBean(EncodingCursorStrategy.class));
9895
}
9996

10097
@Test

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationWithoutSpringJdbcTests.java

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
import org.junit.jupiter.api.Test;
2626

2727
import org.springframework.boot.autoconfigure.AutoConfigurations;
28-
import org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener;
29-
import org.springframework.boot.logging.LogLevel;
3028
import org.springframework.boot.test.context.FilteredClassLoader;
3129
import org.springframework.boot.test.context.runner.ApplicationContextRunner;
3230
import org.springframework.boot.testsupport.classpath.ClassPathExclusions;
@@ -46,25 +44,22 @@ class DataSourceAutoConfigurationWithoutSpringJdbcTests {
4644

4745
@Test
4846
void pooledDataSourceCanBeAutoConfigured() {
49-
this.contextRunner.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
50-
.run((context) -> {
51-
HikariDataSource dataSource = context.getBean(HikariDataSource.class);
52-
assertThat(dataSource.getJdbcUrl()).isNotNull();
53-
assertThat(dataSource.getDriverClassName()).isNotNull();
54-
});
47+
this.contextRunner.run((context) -> {
48+
HikariDataSource dataSource = context.getBean(HikariDataSource.class);
49+
assertThat(dataSource.getJdbcUrl()).isNotNull();
50+
assertThat(dataSource.getDriverClassName()).isNotNull();
51+
});
5552
}
5653

5754
@Test
5855
void withoutConnectionPoolsAutoConfigurationBacksOff() {
59-
this.contextRunner.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
60-
.with(hideConnectionPools())
56+
this.contextRunner.with(hideConnectionPools())
6157
.run((context) -> assertThat(context).doesNotHaveBean(DataSource.class));
6258
}
6359

6460
@Test
6561
void withUrlAndWithoutConnectionPoolsAutoConfigurationBacksOff() {
66-
this.contextRunner.withInitializer(ConditionEvaluationReportLoggingListener.forLogLevel(LogLevel.INFO))
67-
.with(hideConnectionPools())
62+
this.contextRunner.with(hideConnectionPools())
6863
.withPropertyValues("spring.datasource.url:jdbc:hsqldb:mem:testdb-" + new Random().nextInt())
6964
.run((context) -> assertThat(context).doesNotHaveBean(DataSource.class));
7065
}

spring-boot-project/spring-boot-docker-compose/src/main/java/org/springframework/boot/docker/compose/service/connection/ldap/LLdapDockerComposeConnectionDetailsFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
class LLdapDockerComposeConnectionDetailsFactory extends DockerComposeConnectionDetailsFactory<LdapConnectionDetails> {
3333

34-
protected LLdapDockerComposeConnectionDetailsFactory() {
34+
LLdapDockerComposeConnectionDetailsFactory() {
3535
super("lldap/lldap");
3636
}
3737

spring-boot-project/spring-boot-docs/src/docs/antora/modules/reference/pages/actuator/observability.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ If you have defined your own javadoc:io.opentelemetry.sdk.resources.Resource[] b
104104
NOTE: Spring Boot does not provide auto-configuration for OpenTelemetry metrics or logging.
105105
OpenTelemetry tracing is only auto-configured when used together with xref:actuator/tracing.adoc[Micrometer Tracing].
106106

107-
NOTE: The `OTEL_RESOURCE_ATTRIBUTES` environment variable consist of a list of key-value pairs.
107+
NOTE: The `OTEL_RESOURCE_ATTRIBUTES` environment variable consists of a list of key-value pairs.
108108
For example: `key1=value1,key2=value2,key3=spring%20boot`.
109109
All attribute values are treated as strings, and any characters outside the baggage-octet range must be **percent-encoded**.
110110

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/context/config/FileExtensionHint.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.regex.Pattern;
2121

2222
/**
23-
* User provided hint for an otherwise missing file extension.
23+
* User-provided hint for an otherwise missing file extension.
2424
*
2525
* @author Phillip Webb
2626
*/

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/jdbc/EmbeddedDatabaseConnection.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,8 @@ private static EmbeddedDatabaseConnection getEmbeddedDatabaseConnection(String d
163163
* @return true if the data source is one of the embedded types
164164
*/
165165
public static boolean isEmbedded(DataSource dataSource) {
166-
try {
167-
try (Connection connection = dataSource.getConnection()) {
168-
return new IsEmbedded().apply(connection);
169-
}
166+
try (Connection connection = dataSource.getConnection()) {
167+
return new IsEmbedded().apply(connection);
170168
}
171169
catch (SQLException ex) {
172170
// Could not connect, which means it's not embedded

0 commit comments

Comments
 (0)