cloudfoundry / java-buildpack-auto-reconfiguration

Auto-reconfiguration functionality for the Java Buildpack
Apache License 2.0
219 stars 103 forks source link

Add CloudProfileApplicationListener and use that for Spring Boot #47

Closed dsyer closed 9 years ago

dsyer commented 9 years ago

Instead of using the CloudProfileApplicationContextInitializer, which is fine in a container application but comes too late in the lifecycle of a SpringBoot app, we register an ApplicationListener to activate the cloud profile.

I suspect that any integration tests that already exist for this feature would also need to be updated, to test that the profile is active in time to read the config files (application-cloud.properties for instance).