Skip to content

PathMatchingResourcePatternResolver no longer follows symlinks #33424

@p120ph37

Description

@p120ph37

Affects: 6.0.x, 6.1.x


From 5.3.x to 6.0.x, the implementation of filesystem-searching in PathMatchingResourcePatternResolver was changed from a recursive call to java.io.File.listFiles() to a single call to java.nio.file.Files.walk(rootPath). This changed the default behavior so that PathMatchingResourcePatternResolver.getResources("file:./thisisasymlink/*.txt") no longer works.

The java.nio.file.Files.walk method can follow symlinks, but that behavior must be requested by supplying the FileVisitOption.FOLLOW_LINKS option like this: Files.walk(rootPath, FOLLOW_LINKS)

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: regressionA bug that is also a regression

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy