|
|
|
@ -23,6 +23,9 @@ import java.util.Arrays; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.Collection; |
|
|
|
import java.util.List; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.commons.logging.Log; |
|
|
|
|
|
|
|
import org.apache.commons.logging.LogFactory; |
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.core.io.Resource; |
|
|
|
import org.springframework.core.io.Resource; |
|
|
|
import org.springframework.util.SystemPropertyUtils; |
|
|
|
import org.springframework.util.SystemPropertyUtils; |
|
|
|
|
|
|
|
|
|
|
|
@ -50,6 +53,8 @@ import org.springframework.util.SystemPropertyUtils; |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public class ResourceArrayPropertyEditor extends PropertyEditorSupport { |
|
|
|
public class ResourceArrayPropertyEditor extends PropertyEditorSupport { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final Log logger = LogFactory.getLog(ResourceArrayPropertyEditor.class); |
|
|
|
|
|
|
|
|
|
|
|
private final ResourcePatternResolver resourcePatternResolver; |
|
|
|
private final ResourcePatternResolver resourcePatternResolver; |
|
|
|
|
|
|
|
|
|
|
|
private final boolean ignoreUnresolvablePlaceholders; |
|
|
|
private final boolean ignoreUnresolvablePlaceholders; |
|
|
|
@ -122,8 +127,10 @@ public class ResourceArrayPropertyEditor extends PropertyEditorSupport { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
catch (IOException ex) { |
|
|
|
catch (IOException ex) { |
|
|
|
throw new IllegalArgumentException( |
|
|
|
// ignore - might be an unresolved placeholder or non-existing base directory
|
|
|
|
"Could not resolve resource location pattern [" + pattern + "]: " + ex.getMessage()); |
|
|
|
if (logger.isDebugEnabled()) { |
|
|
|
|
|
|
|
logger.debug("Could not retrieve resources for pattern '" + pattern + "': " + ex); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
else if (element instanceof Resource) { |
|
|
|
else if (element instanceof Resource) { |
|
|
|
|