Refine String to File conversion support

Refine the conversion support so that file URLs are support without
reintroducing gh-12163.

Closes gh-16931
pull/18501/head
Phillip Webb 5 years ago
parent 680cdb471f
commit be7a7bb2e9

@ -41,7 +41,7 @@ class StringToFileConverter implements Converter<String, File> {
return getFile(resourceLoader.getResource(source));
}
File file = new File(source);
if (file.isAbsolute()) {
if (file.exists()) {
return file;
}
Resource resource = resourceLoader.getResource(source);

Loading…
Cancel
Save