@ -135,6 +135,8 @@ public class DefaultBeanDefinitionDocumentReader implements BeanDefinitionDocume
if (StringUtils.hasText(profileSpec)) {
String[] specifiedProfiles = StringUtils.tokenizeToStringArray(
profileSpec, BeanDefinitionParserDelegate.MULTI_VALUE_ATTRIBUTE_DELIMITERS);
// We cannot use Profiles.of(...) since profile expressions are not supported
// in XML config. See SPR-12458 for details.
if (!getReaderContext().getEnvironment().acceptsProfiles(specifiedProfiles)) {
if (logger.isInfoEnabled()) {
logger.info("Skipped XML bean definition file due to specified profiles [" + profileSpec +
@ -38,6 +38,7 @@ import static org.springframework.core.env.AbstractEnvironment.*;
* @author Chris Beams
* @author Juergen Hoeller
*/
@SuppressWarnings("deprecation")
public class StandardEnvironmentTests {
private static final String ALLOWED_PROPERTY_NAME = "theanswer";