|
|
|
@ -17,6 +17,7 @@ |
|
|
|
package org.springframework.core.io.support; |
|
|
|
package org.springframework.core.io.support; |
|
|
|
|
|
|
|
|
|
|
|
import java.io.File; |
|
|
|
import java.io.File; |
|
|
|
|
|
|
|
import java.io.FileNotFoundException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.io.IOException; |
|
|
|
import java.lang.reflect.InvocationHandler; |
|
|
|
import java.lang.reflect.InvocationHandler; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
import java.lang.reflect.Method; |
|
|
|
@ -171,7 +172,7 @@ import org.springframework.util.StringUtils; |
|
|
|
* @author Colin Sampaleanu |
|
|
|
* @author Colin Sampaleanu |
|
|
|
* @author Marius Bogoevici |
|
|
|
* @author Marius Bogoevici |
|
|
|
* @author Costin Leau |
|
|
|
* @author Costin Leau |
|
|
|
* @author Phil Webb |
|
|
|
* @author Phillip Webb |
|
|
|
* @since 1.0.2 |
|
|
|
* @since 1.0.2 |
|
|
|
* @see #CLASSPATH_ALL_URL_PREFIX |
|
|
|
* @see #CLASSPATH_ALL_URL_PREFIX |
|
|
|
* @see org.springframework.util.AntPathMatcher |
|
|
|
* @see org.springframework.util.AntPathMatcher |
|
|
|
@ -696,10 +697,16 @@ public class PathMatchingResourcePatternResolver implements ResourcePatternResol |
|
|
|
try { |
|
|
|
try { |
|
|
|
rootDir = rootDirResource.getFile().getAbsoluteFile(); |
|
|
|
rootDir = rootDirResource.getFile().getAbsoluteFile(); |
|
|
|
} |
|
|
|
} |
|
|
|
catch (IOException ex) { |
|
|
|
catch (FileNotFoundException ex) { |
|
|
|
|
|
|
|
if (logger.isInfoEnabled()) { |
|
|
|
|
|
|
|
logger.info("Cannot search for matching files underneath " + rootDirResource + |
|
|
|
|
|
|
|
" in the file system: " + ex.getMessage()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return Collections.emptySet(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
catch (Exception ex) { |
|
|
|
if (logger.isWarnEnabled()) { |
|
|
|
if (logger.isWarnEnabled()) { |
|
|
|
logger.warn("Cannot search for matching files underneath " + rootDirResource + |
|
|
|
logger.warn("Failed to resolve " + rootDirResource + " in the file system: " + ex); |
|
|
|
" because it does not correspond to a directory in the file system", ex); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return Collections.emptySet(); |
|
|
|
return Collections.emptySet(); |
|
|
|
} |
|
|
|
} |
|
|
|
|