<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation=
         "http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/util 
          http://www.springframework.org/schema/util/spring-util-3.0.xsd">
  
  <!-- 
    this makes application properties accessible to the rest of the beans in the app via ${}-style variable references instead
    of the ref element 
  --> 
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="location" value="file://${configDir:/etc/ohmage}/configuration.properties"/>
    <property name="propertiesArray">
      <list>
        <ref bean="dbProps" />
      </list>
    </property>
    <property name="ignoreResourceNotFound" value="true"/>
  </bean>
  
  <util:map id="dbProps">
    <entry key="db.driver" value="com.mysql.jdbc.Driver"/>
    <entry key="db.jdbcurl" value="jdbc:mysql://${mysql.host:localhost}:${mysql.port:3306}/${mysql.db:ohmage}"/>
    <entry key="db.username" value="${mysql.user:ohmage}"/>
    <entry key="db.password" value="${mysql.pw:&amp;!sickly}"/>
  </util:map>

</beans>

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:util="http://www.springframework.org/schema/util"
       xsi:schemaLocation=
         "http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/util 
          http://www.springframework.org/schema/util/spring-util-3.0.xsd">
  
  <!-- 
    this makes application properties accessible to the rest of the beans in the app via ${}-style variable references instead
    of the ref element 
  --> 
  <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
    <property name="propertiesArray">
      <list>
        <ref bean="dbProps" />
      </list>
    </property>
  </bean>
  
  <util:map id="dbProps">
    <entry key="db.driver" value="com.mysql.jdbc.Driver"/>
    <entry key="db.jdbcurl" value="jdbc:mysql://localhost:3306/ohmage"/>
    <entry key="db.username" value="ohmage"/>
    <entry key="db.password" value="&amp;!sickly"/>
  </util:map>

</beans>
Revert "changes to spring config to allow for external config file"
Revert "changes to spring config to allow for external config file"

This reverts commit c6093fc45998f646fb9343c364805b10195adcdf.
