[bs-17], [bs-146] Add some ApplicationContextInitializers

* One for Cloud Foundry and one for the application context ID
* If app runs in Cloud Foundry vcap.application.* and vcap.services.*
will be populated in the Environment
* The ApplicationContext ID is set to something supposedly unique
(e.g. name:index in a Cloud Foundry app)

[#50968415] [#48153639]
This commit is contained in:
Dave Syer
2013-06-04 16:18:12 +01:00
parent e0d7fc2240
commit e60efc7e55
15 changed files with 813 additions and 4 deletions

View File

@@ -138,7 +138,7 @@ public class ServiceBootstrapApplicationTests {
@SuppressWarnings("unchecked")
Map<String, Object> body = (Map<String, Object>) entity.getBody().get(0);
assertTrue("Wrong body: " + body,
((String) body.get("context")).startsWith("org.springframework"));
((String) body.get("context")).startsWith("application"));
}
private RestTemplate getRestTemplate() {