Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-15989

PathMatchingResourcePatternResolver provides duplicate resources when using classpath* prefix combined with ant-style

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Complete
    • Affects Version/s: 4.3.8, 4.3.9, 4.3.10, 4.3.11
    • Fix Version/s: 4.3.12, 5.0 GA
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      true

      Description

      PathMatchingResourcePatternResolver provides duplicate resources when using "classpath*" prefix combined with Ant-style patterns.

      I'll attach an application that reproduces the problem.The application uses the location pattern "classpath*:/*-perm.json" to resolve Resources.
      If you package and run it

      mvn clean package && java -jar target/resources-0.0.1-SNAPSHOT.jar
      

      You should see the following output:

      file:/D:/resources/target/resources-0.0.1-SNAPSHOT.jar!/
      file:D:\resources\target\resources-0.0.1-SNAPSHOT.jar!/
      file:/C:/Program%20Files/Java/jdk1.8.0_40/jre/lib/ext/dnsns.jar!/
      ...
      file:/D:/resources/target/resources-0.0.1-SNAPSHOT.jar!/domaine-perm.json
      file:D:\resources\target\resources-0.0.1-SNAPSHOT.jar!/domaine-perm.json
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                juergen.hoeller Juergen Hoeller
                Reporter:
                Maël OUAHI Maël OUAHI
                Last updater:
                Spring Issuemaster
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  39 weeks, 5 days ago