Skip to content

Commit 328f670

Browse files
committed
Migrate to FileSystemResource wherever necessary
Closes gh-43777
1 parent cc49b30 commit 328f670

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

spring-boot-project/spring-boot/src/main/java/org/springframework/boot/env/ConfigTreePropertySource.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2024 the original author or authors.
2+
* Copyright 2012-2025 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -43,8 +43,8 @@
4343
import org.springframework.core.env.EnumerablePropertySource;
4444
import org.springframework.core.env.Environment;
4545
import org.springframework.core.env.PropertySource;
46+
import org.springframework.core.io.FileSystemResource;
4647
import org.springframework.core.io.InputStreamSource;
47-
import org.springframework.core.io.PathResource;
4848
import org.springframework.core.io.Resource;
4949
import org.springframework.util.Assert;
5050
import org.springframework.util.FileCopyUtils;
@@ -176,7 +176,7 @@ private static final class PropertyFile {
176176

177177
private final Path path;
178178

179-
private final PathResource resource;
179+
private final FileSystemResource resource;
180180

181181
private final Origin origin;
182182

@@ -186,7 +186,7 @@ private static final class PropertyFile {
186186

187187
private PropertyFile(Path path, Set<Option> options) {
188188
this.path = path;
189-
this.resource = new PathResource(path);
189+
this.resource = new FileSystemResource(path);
190190
this.origin = new TextResourceOrigin(this.resource, START_OF_FILE);
191191
this.autoTrimTrailingNewLine = options.contains(Option.AUTO_TRIM_TRAILING_NEW_LINE);
192192
this.cachedContent = options.contains(Option.ALWAYS_READ) ? null

0 commit comments

Comments
 (0)