Merge branch '2.4.x'
Closes gh-25693
This commit is contained in:
@@ -152,7 +152,7 @@ public class DataSourceInitializer {
|
||||
}
|
||||
else if (validate) {
|
||||
throw new InvalidConfigurationPropertyValueException(propertyName, resource,
|
||||
"The specified resource does not exist.");
|
||||
"No resources were found at location '" + location + "'.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -231,8 +231,10 @@ class DataSourceInitializationIntegrationTests {
|
||||
"spring.datasource.schema:classpath:does/not/exist.sql").run((context) -> {
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context.getStartupFailure()).isInstanceOf(BeanCreationException.class);
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining("does/not/exist.sql");
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining("[does/not/exist.sql]");
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining("spring.datasource.schema");
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining(
|
||||
"No resources were found at location 'classpath:does/not/exist.sql'.");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -243,8 +245,10 @@ class DataSourceInitializationIntegrationTests {
|
||||
"spring.datasource.data:classpath:does/not/exist.sql").run((context) -> {
|
||||
assertThat(context).hasFailed();
|
||||
assertThat(context.getStartupFailure()).isInstanceOf(BeanCreationException.class);
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining("does/not/exist.sql");
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining("[does/not/exist.sql]");
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining("spring.datasource.data");
|
||||
assertThat(context.getStartupFailure()).hasMessageContaining(
|
||||
"No resources were found at location 'classpath:does/not/exist.sql'.");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user