{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2505","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2505/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2505/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2505/events","html_url":"https://github.com/spring-projects/spring-boot/issues/2505","id":57906635,"number":2505,"title":"Update @IntegrationTest for latest changes in Spring","user":{"login":"dsyer","id":124075,"avatar_url":"https://avatars.githubusercontent.com/u/124075?v=3","gravatar_id":"","url":"https://api.github.com/users/dsyer","html_url":"https://github.com/dsyer","followers_url":"https://api.github.com/users/dsyer/followers","following_url":"https://api.github.com/users/dsyer/following{/other_user}","gists_url":"https://api.github.com/users/dsyer/gists{/gist_id}","starred_url":"https://api.github.com/users/dsyer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsyer/subscriptions","organizations_url":"https://api.github.com/users/dsyer/orgs","repos_url":"https://api.github.com/users/dsyer/repos","events_url":"https://api.github.com/users/dsyer/events{/privacy}","received_events_url":"https://api.github.com/users/dsyer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-17T10:23:50Z","updated_at":"2015-02-17T19:48:10Z","closed_at":null,"body":"See https://jira.spring.io/browse/SPR-12710 for discussion. There are some new public methods that will make it possible to refactor `@IntegrationTest` without any reflection hacks."},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/74738624","html_url":"https://github.com/spring-projects/spring-boot/issues/2505#issuecomment-74738624","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/2505","id":74738624,"user":{"login":"sbrannen","id":104798,"avatar_url":"https://avatars.githubusercontent.com/u/104798?v=3","gravatar_id":"","url":"https://api.github.com/users/sbrannen","html_url":"https://github.com/sbrannen","followers_url":"https://api.github.com/users/sbrannen/followers","following_url":"https://api.github.com/users/sbrannen/following{/other_user}","gists_url":"https://api.github.com/users/sbrannen/gists{/gist_id}","starred_url":"https://api.github.com/users/sbrannen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sbrannen/subscriptions","organizations_url":"https://api.github.com/users/sbrannen/orgs","repos_url":"https://api.github.com/users/sbrannen/repos","events_url":"https://api.github.com/users/sbrannen/events{/privacy}","received_events_url":"https://api.github.com/users/sbrannen/received_events","type":"User","site_admin":false},"created_at":"2015-02-17T19:48:10Z","updated_at":"2015-02-17T19:48:10Z","body":"Update: to invoke `TestPropertySourceUtils.addPropertiesFilesToEnvironment()` with the application context before it has been refreshed, one option is to override the `postProcessApplicationContext()` method in a custom extension of `SpringApplication` (returned by `SpringApplicationContextLoader.getSpringApplication()`). The only issue there is that `getSpringApplication()` is not currently provided access to the `MergedContextConfiguration` which will be needed by `postProcessApplicationContext()` so that it can invoke:\r\n\r\n    TestPropertySourceUtils.addPropertiesFilesToEnvironment(context, config.getPropertySourceLocations())\r\n\r\nI guess you could introduce `getSpringApplication(MergedContextConfiguration)` and deprecate `getSpringApplication()`.\r\n\r\nAnother option would be to register a custom `ApplicationContextInitializer` that invokes `TestPropertySourceUtils.addPropertiesFilesToEnvironment()`.\r\n\r\nIf you run into any challenges, please just let me know."}}