Skip to content
No description or website provided.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

EY Yaml Persister

Spring Yaml properties persister to read AppCloud configuration properties and expose them as Spring placeholders.

Maven install

Add dependency:

  • Note: This artifact is not in any public repository yet, you can download the source code and install it on your local machine with mvn install


Add the persister to your Spring configuration:

<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location">
    <property name="propertiesPersister" ref="persister"></property>
<bean id="persister" class="com.engineyard.appcloud.yaml.YamlPropertiesPersister"></bean>

The database file for your app should be located under `/data/YOUR_APP_NAME/current/config/database.yml'

properties exposed:

  • ENVIRONMENT.adapter
  • ENVIRONMENT.database
  • ENVIRONMENT.username
  • ENVIRONMENT.password
  • ENVIRONMENT.reconnect

Where ENVIRONMENT is the environment that you chose, for instance production or staging.

Use those variables to configure you datasource:

<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"
      p:driverClassName="com.mysql.jdbc.Driver" p:url="jdbc:mysql://${}:3306/${production.database}"
      p:username="${production.username}" p:password="${production.password}"/>
Something went wrong with that request. Please try again.