|
|
@ -18,6 +18,7 @@ package org.springframework.core.env; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import org.springframework.util.Assert; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
import org.springframework.util.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -43,4 +44,15 @@ public class MapPropertySource extends EnumerablePropertySource<Map<String, Obje |
|
|
|
return StringUtils.toStringArray(this.source.keySet()); |
|
|
|
return StringUtils.toStringArray(this.source.keySet()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean containsProperty(String name) { |
|
|
|
|
|
|
|
Assert.notNull(name, "Property name must not be null"); |
|
|
|
|
|
|
|
boolean containsProperty = this.source.containsKey(name); |
|
|
|
|
|
|
|
if (logger.isDebugEnabled()) { |
|
|
|
|
|
|
|
logger.debug(String.format("PropertySource [%s] %s '%s'", getName(), |
|
|
|
|
|
|
|
(containsProperty ? "contains" : "does not contain"), name)); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return containsProperty; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|