List of usage examples for org.springframework.core.io.support PathMatchingResourcePatternResolver getPathMatcher
public PathMatcher getPathMatcher()
From source file:com.griddynamics.banshun.ContextParentBean.java
protected List<String> resolveConfigLocations(List<String> configLocations) throws Exception { PathMatchingResourcePatternResolver pmrpr = new PathMatchingResourcePatternResolver(); for (String location : this.configLocations) { boolean wildcard = pmrpr.getPathMatcher().isPattern(location); List<String> collectedLocations = collectConfigLocations(location); for (String locName : collectedLocations) { if (!configLocations.contains(locName) && wildcard) { configLocations.add(locName); }// w w w. ja va 2 s . c om if (!wildcard) { configLocations.remove(locName); configLocations.add(locName); } } } log.info("resolved locations: {}", configLocations); return configLocations; }