
private List<Resource> getResources(String propertyName, List<String> locations, boolean validate) {
List<Resource> resources = new ArrayList<>();
for (String location : locations) {
for (Resource resource : doGetResources(location)) {
if (resource.exists()) {
resources.add(resource);
}
else if (validate) {
throw new InvalidConfigurationPropertyValueException(propertyName, resource,
"The specified resource does not exist.");
}
}
}
return resources;
}
location就是一个字符类型的位置信息,所以可以使用如下配置,显然就可以自定义schema脚本,不需要固定为schema.sql或者schema-all.sql
