Deprecate PathResource variant

This commit deprecates the `PathResource` implementation variant in
favor of `FileSystemResource`. This was already pointing to
`FileSystemResource` as of Spring Framework 5.1 and we now consider this
variant as deprecated.

Closes gh-34206
This commit is contained in:
Brian Clozel
2025-01-07 16:09:37 +01:00
parent e184860ca4
commit 1b7ccbce2a
2 changed files with 3 additions and 0 deletions

View File

@@ -56,7 +56,9 @@ import org.springframework.util.Assert;
* @see java.nio.file.Path
* @see java.nio.file.Files
* @see FileSystemResource
* @deprecated since 7.0 in favor of {@link FileSystemResource}
*/
@Deprecated(since = "7.0", forRemoval = true)
public class PathResource extends AbstractResource implements WritableResource {
private final Path path;

View File

@@ -50,6 +50,7 @@ import static org.mockito.Mockito.mock;
* @author Juergen Hoeller
* @author Arjen Poutsma
*/
@SuppressWarnings("removal")
class PathResourceTests {
private static final String TEST_DIR =