@Test void testWildcardInBucketName() throws Exception { AmazonS3 amazonS3 = prepareMockForTestWildcardInBucketName(); ResourcePatternResolver resourceLoader = getResourceLoader(amazonS3); assertThat(resourceLoader.getResources("s3: .as("test the single '*' wildcard").isEqualTo(2); assertThat(resourceLoader.getResources("s3: .as("test the '?' wildcard").isEqualTo(1); assertThat(resourceLoader.getResources("s3:/test.txt").length) .as("test the double '**' wildcard").isEqualTo(2); }
@Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } PathMatchingSimpleStorageResourcePatternResolver(AmazonS3 amazonS3,
			ResourcePatternResolver resourcePatternResolverDelegate); }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } PathMatchingSimpleStorageResourcePatternResolver(AmazonS3 amazonS3,
			ResourcePatternResolver resourcePatternResolverDelegate); void setPathMatcher(PathMatcher pathMatcher); @Override Resource[] getResources(String locationPattern); @Override Resource getResource(String location); @Override ClassLoader getClassLoader(); }
PathMatchingSimpleStorageResourcePatternResolver implements ResourcePatternResolver { @Override public Resource[] getResources(String locationPattern) throws IOException { if (SimpleStorageNameUtils.isSimpleStorageResource(locationPattern)) { if (this.pathMatcher .isPattern(SimpleStorageNameUtils.stripProtocol(locationPattern))) { LOGGER.debug("Found wildcard pattern in location {}", locationPattern); return findPathMatchingResources(locationPattern); } else { return new Resource[] { this.resourcePatternResolverDelegate .getResource(locationPattern) }; } } else { return this.resourcePatternResolverDelegate.getResources(locationPattern); } } PathMatchingSimpleStorageResourcePatternResolver(AmazonS3 amazonS3,
			ResourcePatternResolver resourcePatternResolverDelegate); void setPathMatcher(PathMatcher pathMatcher); @Override Resource[] getResources(String locationPattern); @Override Resource getResource(String location); @Override ClassLoader getClassLoader();  }