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. These modifications include:
- Augmenting
contextConfigLocation. The function starts be enumerating the currentcontextConfigLocations. If none exist, a default configuration is created with/WEB-INF/application-context.xmlor/WEB-INF/<servlet-name>-servlet.xmlas the default. An additional location is then added to the collection of locations;classpath:META- INF/cloud/cloudfoundry-auto-reconfiguration-context.xmlif theApplicationContextis XML-based,org.cloudfoundry.reconfiguration.spring.web.CloudAppAnnotationConfigAutoReconfigif theApplicationContextis annotation-based. - Augmenting
contextInitializerClasses. The function starts by enumerating the currentcontextInitializerClasses. If none exist, a default configuration is created with no value as the default. Theorg.cloudfoundry.reconfiguration.spring.CloudApplicationContextInitializerclass is then added to the collection of classes.
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. The framework uses the Repository utility support and so it supports the version syntax defined there.
| Name | Description |
|---|---|
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. |