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 currentcontextConfigLocation
s. If none exist, a default configuration is created with/WEB-INF/application-context.xml
or/WEB-INF/<servlet-name>-servlet.xml
as the default. An additional location is then added to the collection of locations;classpath:META- INF/cloud/cloudfoundry-auto-reconfiguration-context.xml
if theApplicationContext
is XML-based,org.cloudfoundry.reconfiguration.spring.web.CloudAppAnnotationConfigAutoReconfig
if theApplicationContext
is 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.CloudApplicationContextInitializer
class 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. |