diff --git a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToFileConverter.java b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToFileConverter.java index 60b6f1b627d..70c486dcbde 100644 --- a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToFileConverter.java +++ b/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/convert/StringToFileConverter.java @@ -41,7 +41,7 @@ class StringToFileConverter implements Converter { return getFile(resourceLoader.getResource(source)); } File file = new File(source); - if (file.isAbsolute()) { + if (file.exists()) { return file; } Resource resource = resourceLoader.getResource(source);