mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.7.x' into 3.0.x
Closes gh-34799
This commit is contained in:
commit
16b126a481
@ -135,7 +135,7 @@ public class CassandraAutoConfiguration {
|
||||
config = config.withFallback(loadConfig(properties.getConfig()));
|
||||
}
|
||||
config = config.withFallback(SPRING_BOOT_DEFAULTS);
|
||||
config = config.withFallback(ConfigFactory.defaultReference());
|
||||
config = config.withFallback(ConfigFactory.defaultReferenceUnresolved());
|
||||
return config.resolve();
|
||||
}
|
||||
|
||||
|
@ -298,6 +298,18 @@ class CassandraAutoConfigurationTests {
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void placeholdersInReferenceConfAreResolvedAgainstConfigDerivedFromSpringCassandraProperties() {
|
||||
this.contextRunner.withPropertyValues("spring.cassandra.request.timeout=60s").run((context) -> {
|
||||
DriverExecutionProfile actual = context.getBean(DriverConfigLoader.class)
|
||||
.getInitialConfig()
|
||||
.getDefaultProfile();
|
||||
assertThat(actual.getDuration(DefaultDriverOption.REQUEST_TIMEOUT)).isEqualTo(Duration.ofSeconds(60));
|
||||
assertThat(actual.getDuration(DefaultDriverOption.METADATA_SCHEMA_REQUEST_TIMEOUT))
|
||||
.isEqualTo(Duration.ofSeconds(60));
|
||||
});
|
||||
}
|
||||
|
||||
@Test
|
||||
void driverConfigLoaderWithConfigCreateProfiles() {
|
||||
String configLocation = "org/springframework/boot/autoconfigure/cassandra/profiles.conf";
|
||||
|
Loading…
Reference in New Issue
Block a user