@@ -492,10 +492,10 @@ When the path location contains an Ant-style pattern, for example:
492
492
classpath:com/mycompany/**/applicationContext.xml
493
493
----
494
494
495
- ... the resolver follows a more complex but defined procedure to try to resolve the
495
+ The resolver follows a more complex but defined procedure to try to resolve the
496
496
wildcard. It produces a Resource for the path up to the last non-wildcard segment and
497
- obtains a URL from it. If this URL is not a " jar:" URL or container-specific variant
498
- (e.g. " `zip:`" in WebLogic, " `wsjar`" in WebSphere, etc.), then a `java.io.File` is
497
+ obtains a URL from it. If this URL is not a ` jar:` URL or container-specific variant
498
+ (e.g. `zip:` in WebLogic, `wsjar` in WebSphere, etc.), then a `java.io.File` is
499
499
obtained from it and used to resolve the wildcard by traversing the filesystem. In the
500
500
case of a jar URL, the resolver either gets a `java.net.JarURLConnection` from it or
501
501
manually parses the jar URL and then traverses the contents of the jar file to resolve
@@ -555,9 +555,9 @@ inappropriate result is returned, check the application server documentation for
555
555
settings that might affect the classloader behavior.
556
556
====
557
557
558
- The " `classpath*:`" prefix can also be combined with a `PathMatcher` pattern in the
559
- rest of the location path, for example " `classpath*:META-INF/*-beans.xml`" . In this
560
- case, the resolution strategy is fairly simple: a ClassLoader.getResources() call is
558
+ The `classpath*:` prefix can also be combined with a `PathMatcher` pattern in the
559
+ rest of the location path, for example `classpath*:META-INF/*-beans.xml`. In this
560
+ case, the resolution strategy is fairly simple: a ` ClassLoader.getResources()` call is
561
561
used on the last non-wildcard path segment to get all the matching resources in the
562
562
class loader hierarchy, and then off each resource the same PathMatcher resolution
563
563
strategy described above is used for the wildcard subpath.
@@ -567,13 +567,13 @@ strategy described above is used for the wildcard subpath.
567
567
==== Other notes relating to wildcards
568
568
Please note that `classpath*:` when combined with Ant-style patterns will only work
569
569
reliably with at least one root directory before the pattern starts, unless the actual
570
- target files reside in the file system. This means that a pattern like "
571
- `classpath*:*.xml`" will not retrieve files from the root of jar files but rather only
570
+ target files reside in the file system. This means that a pattern like
571
+ `classpath*:*.xml` will not retrieve files from the root of jar files but rather only
572
572
from the root of expanded directories. This originates from a limitation in the JDK's
573
573
`ClassLoader.getResources()` method which only returns file system locations for a
574
574
passed-in empty string (indicating potential roots to search).
575
575
576
- Ant-style patterns with " `classpath:`" resources are not guaranteed to find matching
576
+ Ant-style patterns with `classpath:` resources are not guaranteed to find matching
577
577
resources if the root package to search is available in multiple class path locations.
578
578
This is because a resource such as
579
579
0 commit comments