• Andy Wilkinson's avatar
    Configure test property sources before ConfigFileApplicationListener runs · 601791c6
    Andy Wilkinson authored
    Previously, SpringBootContextLoader configured the environment with the
    test property sources using an ApplicationContextInitializer. This was
    because TestPropertySourceUtils did not provide a method to directly
    configure the environment using properties files, it had to be done
    via an application context. An unwanted side-effect of this was that
    the test property sources were not being configured before
    ConfigFileApplicationListener examined the environment to determine the
    name and locations of the files that it should be loading.
    
    This commit takes advantage of a new method that was added to
    TestPropertySourceUtils which allows properties files to be added
    directly to the environment without using an application context. This
    means that the use of the ApplicationContextInitializer can be removed
    and the test property sources can be applied to the environment before
    the application context is created.
    
    Closes gh-5728
    601791c6
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...