Skip to content

qingwang5/java-buildpack-auto-reconfiguration

 
 

Repository files navigation

Java Buildpack Auto-Reconfiguration

This repository contains the auto-reconfiguration functionality for Spring and Play Framework auto-reconfiguration. It also contains a replacement Play Framework JPA Plugin that can be properly auto-reconfigured.

What is Auto-Reconfiguration?

Auto-reconfiguration consists of three parts.

  1. it adds the cloud profile to Spring's list of active profiles
  2. it exposes all of the properties contributed by Cloud Foundry as a PropertySource in the ApplicationContext
  3. it re-writes the bean definitions of various types to connect automatically with services bound to the application.

The types that are rewritten are as follows:

Bean Type Service Type
javax.sql.DataSource Relational Data Services (e.g. ClearDB, ElephantSQL)
org.springframework.amqp.rabbit.connection.ConnectionFactory RabbitMQ Service (e.g. CloudAMQP)
org.springframework.data.mongodb.MongoDbFactory Mongo Service (e.g. MongoLab)
org.springframework.data.redis.connection.RedisConnectionFactory Redis Service (e.g. Redis Cloud)
org.springframework.orm.hibernate3.AbstractSessionFactoryBean Relational Data Services (e.g. ClearDB, ElephantSQL)
org.springframework.orm.hibernate4.LocalSessionFactoryBean Relational Data Services (e.g. ClearDB, ElephantSQL)
org.springframework.orm.jpa.AbstractEntityManagerFactoryBean Relational Data Services (e.g. ClearDB, ElephantSQL)

More information about Java application development on Cloud Foundry can be found here:

Contributing

Pull requests are welcome; see the contributor guidelines for details.

License

This buildpack is released under version 2.0 of the Apache License.

About

Auto-reconfiguration functionality for the Java Buildpack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.8%
  • Shell 3.8%
  • Batchfile 2.6%
  • Groovy 0.8%