|
|
|
|
@ -1,5 +1,5 @@
@@ -1,5 +1,5 @@
|
|
|
|
|
/* |
|
|
|
|
* Copyright 2002-2014 the original author or authors. |
|
|
|
|
* Copyright 2002-2019 the original author or authors. |
|
|
|
|
* |
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License"); |
|
|
|
|
* you may not use this file except in compliance with the License. |
|
|
|
|
@ -19,19 +19,21 @@ package org.springframework.core.env;
@@ -19,19 +19,21 @@ package org.springframework.core.env;
|
|
|
|
|
import static org.springframework.beans.factory.support.BeanDefinitionBuilder.rootBeanDefinition; |
|
|
|
|
|
|
|
|
|
import org.junit.Test; |
|
|
|
|
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer; |
|
|
|
|
import org.springframework.context.support.GenericApplicationContext; |
|
|
|
|
|
|
|
|
|
@SuppressWarnings("resource") |
|
|
|
|
public class PropertyPlaceholderConfigurerEnvironmentIntegrationTests { |
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
|
@SuppressWarnings("deprecation") |
|
|
|
|
public void test() { |
|
|
|
|
GenericApplicationContext ctx = new GenericApplicationContext(); |
|
|
|
|
ctx.registerBeanDefinition("ppc", |
|
|
|
|
rootBeanDefinition(PropertyPlaceholderConfigurer.class) |
|
|
|
|
rootBeanDefinition(org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.class) |
|
|
|
|
.addPropertyValue("searchSystemEnvironment", false) |
|
|
|
|
.getBeanDefinition()); |
|
|
|
|
ctx.refresh(); |
|
|
|
|
ctx.getBean("ppc"); |
|
|
|
|
ctx.close(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|