The Spring Auto-reconfiguration Framework causes an application to be automatically reconfigured to work with configured cloud services.
Detection Criterion | Existence of a spring-core*.jar file in the application directory |
Tags | spring-auto-reconfiguration=<version> |
If a /WEB-INF/web.xml
file exists, the framework will modify it in addition to making the auto-reconfiguration JAR available on the classpath. This modification consists of adding org.cloudfoundry.reconfiguration.spring.CloudProfileApplicationContextInitializer
, org.cloudfoundry.reconfiguration.spring.CloudPropertySourceApplicationContextInitializer
, and org.cloudfoundry.reconfiguration.spring.CloudAutoReconfigurationApplicationContextInitializer
to the collection of contextInitializerClasses
. The Spring Auto-reconfiguration Framework also adds the cloud
profile to any existing Spring profiles such as those defined in the SPRING_PROFILES_ACTIVE
environment variable.
For general information on configuring the buildpack, refer to Configuration and Extension.
The framework can be configured by modifying the config/spring_auto_reconfiguration.yml
file in the buildpack fork. The framework uses the Repository
utility support and so it supports the version syntax defined there.
Name | Description |
---|---|
enabled |
Whether to attempt auto-reconfiguration |
repository_root |
The URL of the Auto-reconfiguration repository index (details). |
version |
The version of Auto-reconfiguration to use. Candidate versions can be found in this listing. |