renamed AbstractPropertyPlaceholderConfigurer to PlaceholderConfigurerSupport
This commit is contained in:
parent
df6be9f694
commit
ce761d3fe8
|
|
@ -24,7 +24,7 @@ import java.util.Date;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.springframework.beans.factory.config.AbstractPropertyPlaceholderConfigurer;
|
import org.springframework.beans.factory.config.PlaceholderConfigurerSupport;
|
||||||
import org.springframework.beans.factory.config.PropertyOverrideConfigurer;
|
import org.springframework.beans.factory.config.PropertyOverrideConfigurer;
|
||||||
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
|
import org.springframework.beans.factory.config.PropertyPlaceholderConfigurer;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
|
|
@ -45,8 +45,8 @@ public class ContextNamespaceHandlerTests {
|
||||||
public void propertyPlaceholder() throws Exception {
|
public void propertyPlaceholder() throws Exception {
|
||||||
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
|
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
|
||||||
"contextNamespaceHandlerTests-replace.xml", getClass());
|
"contextNamespaceHandlerTests-replace.xml", getClass());
|
||||||
Map<String, AbstractPropertyPlaceholderConfigurer> beans = applicationContext
|
Map<String, PlaceholderConfigurerSupport> beans = applicationContext
|
||||||
.getBeansOfType(AbstractPropertyPlaceholderConfigurer.class);
|
.getBeansOfType(PlaceholderConfigurerSupport.class);
|
||||||
assertFalse("No PropertyPlaceholderConfigurer found", beans.isEmpty());
|
assertFalse("No PropertyPlaceholderConfigurer found", beans.isEmpty());
|
||||||
String s = (String) applicationContext.getBean("string");
|
String s = (String) applicationContext.getBean("string");
|
||||||
assertEquals("No properties replaced", "bar", s);
|
assertEquals("No properties replaced", "bar", s);
|
||||||
|
|
@ -77,8 +77,8 @@ public class ContextNamespaceHandlerTests {
|
||||||
applicationContext.setEnvironment(env);
|
applicationContext.setEnvironment(env);
|
||||||
applicationContext.load(new ClassPathResource("contextNamespaceHandlerTests-simple.xml", getClass()));
|
applicationContext.load(new ClassPathResource("contextNamespaceHandlerTests-simple.xml", getClass()));
|
||||||
applicationContext.refresh();
|
applicationContext.refresh();
|
||||||
Map<String, AbstractPropertyPlaceholderConfigurer> beans = applicationContext
|
Map<String, PlaceholderConfigurerSupport> beans = applicationContext
|
||||||
.getBeansOfType(AbstractPropertyPlaceholderConfigurer.class);
|
.getBeansOfType(PlaceholderConfigurerSupport.class);
|
||||||
assertFalse("No PropertyPlaceholderConfigurer found", beans.isEmpty());
|
assertFalse("No PropertyPlaceholderConfigurer found", beans.isEmpty());
|
||||||
String s = (String) applicationContext.getBean("string");
|
String s = (String) applicationContext.getBean("string");
|
||||||
assertEquals("No properties replaced", "spam", s);
|
assertEquals("No properties replaced", "spam", s);
|
||||||
|
|
@ -103,8 +103,8 @@ public class ContextNamespaceHandlerTests {
|
||||||
public void propertyPlaceholderIgnored() throws Exception {
|
public void propertyPlaceholderIgnored() throws Exception {
|
||||||
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
|
ApplicationContext applicationContext = new ClassPathXmlApplicationContext(
|
||||||
"contextNamespaceHandlerTests-replace-ignore.xml", getClass());
|
"contextNamespaceHandlerTests-replace-ignore.xml", getClass());
|
||||||
Map<String, AbstractPropertyPlaceholderConfigurer> beans = applicationContext
|
Map<String, PlaceholderConfigurerSupport> beans = applicationContext
|
||||||
.getBeansOfType(AbstractPropertyPlaceholderConfigurer.class);
|
.getBeansOfType(PlaceholderConfigurerSupport.class);
|
||||||
assertFalse("No PropertyPlaceholderConfigurer found", beans.isEmpty());
|
assertFalse("No PropertyPlaceholderConfigurer found", beans.isEmpty());
|
||||||
String s = (String) applicationContext.getBean("string");
|
String s = (String) applicationContext.getBean("string");
|
||||||
assertEquals("Properties replaced", "${bar}", s);
|
assertEquals("Properties replaced", "${bar}", s);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue