diff --git a/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesOverridePropertiesFilesTestPropertySourceTests.java b/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesOverridePropertiesFilesTestPropertySourceTests.java index c50f7ba65c..70c54a58b7 100644 --- a/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesOverridePropertiesFilesTestPropertySourceTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/env/InlinedPropertiesOverridePropertiesFilesTestPropertySourceTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -21,9 +21,7 @@ import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.env.Environment; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; @@ -59,11 +57,6 @@ public class InlinedPropertiesOverridePropertiesFilesTestPropertySourceTests { @Configuration static class Config { - - @Bean - public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } } } diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConfig.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConfig.java index 65827d5a61..49d8c1a48e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConfig.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConfig.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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,7 +19,6 @@ package org.springframework.test.context.junit.jupiter; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.test.context.junit.jupiter.comics.Cat; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -33,11 +32,6 @@ import org.springframework.test.context.junit.jupiter.comics.Person; @Configuration public class TestConfig { - @Bean - static PropertySourcesPlaceholderConfigurer placeholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } - @Bean Person dilbert() { return new Person("Dilbert"); diff --git a/spring-test/src/test/java/org/springframework/test/context/junit4/aci/annotation/PropertySourcesInitializerTests.java b/spring-test/src/test/java/org/springframework/test/context/junit4/aci/annotation/PropertySourcesInitializerTests.java index c559396531..955c927e04 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit4/aci/annotation/PropertySourcesInitializerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit4/aci/annotation/PropertySourcesInitializerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2014 the original author or authors. + * Copyright 2002-2017 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. @@ -25,7 +25,6 @@ import org.springframework.context.ApplicationContextInitializer; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.context.support.PropertySourcesPlaceholderConfigurer; import org.springframework.core.env.PropertySource; import org.springframework.mock.env.MockPropertySource; import org.springframework.test.context.ContextConfiguration; @@ -48,8 +47,7 @@ public class PropertySourcesInitializerTests { static class Config { @Value("${enigma}") - // If the PropertySourcesPlaceholderConfigurer is not configured as a - // static @Bean, then the following can be used to directly access the + // The following can also be used to directly access the // environment instead of relying on placeholder replacement. // @Value("#{ environment['enigma'] }") private String enigma; @@ -60,10 +58,6 @@ public class PropertySourcesInitializerTests { return enigma; } - @Bean - public static PropertySourcesPlaceholderConfigurer placeholderConfigurer() { - return new PropertySourcesPlaceholderConfigurer(); - } }