Strabon

changeset 550:e5930301d59c

added connection.properties under WEB-INF/ directory. Now the connection details have to be given in that file only.
This change is for facilitating the permanent update of connection details.
author Babis Nikolaou <charnik@di.uoa.gr>
date Sat Sep 15 23:52:14 2012 +0300 (2012-09-15)
parents 9c566efc5991
children e110c06e399b
files endpoint/WebContent/WEB-INF/beans.xml endpoint/WebContent/WEB-INF/connection.properties endpoint/pom.xml
line diff
     1.1 --- a/endpoint/WebContent/WEB-INF/beans.xml	Sat Sep 15 21:53:42 2012 +0300
     1.2 +++ b/endpoint/WebContent/WEB-INF/beans.xml	Sat Sep 15 23:52:14 2012 +0300
     1.3 @@ -6,6 +6,14 @@
     1.4  		xmlns:jaxws="http://cxf.apache.org/jaxws"
     1.5  		jaxws:schemaLocation="http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
     1.6  
     1.7 +	<bean id="serverProperties" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
     1.8 +		<property name="locations">
     1.9 +			<list>
    1.10 +				<value>WEB-INF/connection.properties</value>
    1.11 +			</list>
    1.12 +		</property>
    1.13 +	</bean>
    1.14 +  
    1.15      <bean
    1.16          id="strabonBean"
    1.17          class="eu.earthobservatory.org.StrabonEndpoint.StrabonBeanWrapper"
    1.18 @@ -13,27 +21,27 @@
    1.19  
    1.20          <constructor-arg type="java.lang.String" >
    1.21              <!-- Database name -->
    1.22 -            <value>endpoint</value>
    1.23 +            <value>${dbname}</value>
    1.24          </constructor-arg>
    1.25  
    1.26          <constructor-arg type="java.lang.String" >
    1.27              <!-- Username -->
    1.28 -            <value>postgres</value>
    1.29 +            <value>${username}</value>
    1.30          </constructor-arg>
    1.31  
    1.32          <constructor-arg type="java.lang.String" >
    1.33              <!-- Password -->
    1.34 -	    <value>postgres</value>
    1.35 +	    <value>${password}</value>
    1.36          </constructor-arg>
    1.37  
    1.38          <constructor-arg type="int" >
    1.39              <!-- Port -->
    1.40 -            <value>5432</value>
    1.41 +            <value>${port}</value>
    1.42          </constructor-arg>
    1.43  
    1.44          <constructor-arg type="java.lang.String" >
    1.45              <!-- Database server -->
    1.46 -            <value>localhost</value>
    1.47 +            <value>${hostname}</value>
    1.48          </constructor-arg>
    1.49  
    1.50          <constructor-arg type="boolean" >
    1.51 @@ -43,7 +51,7 @@
    1.52  
    1.53          <constructor-arg type="java.lang.String" >
    1.54              <!-- Database Backend (either "postgis" or "monetdb") -->
    1.55 -            <value>postgis</value>
    1.56 +            <value>${dbengine}</value>
    1.57          </constructor-arg>
    1.58          
    1.59           <constructor-arg>
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/endpoint/WebContent/WEB-INF/connection.properties	Sat Sep 15 23:52:14 2012 +0300
     2.3 @@ -0,0 +1,6 @@
     2.4 +dbname 		= endpoint
     2.5 +username 	= postgres
     2.6 +password 	= postgres
     2.7 +port		= 5432
     2.8 +hostname	= localhost
     2.9 +dbengine	= postgis
    2.10 \ No newline at end of file
     3.1 --- a/endpoint/pom.xml	Sat Sep 15 21:53:42 2012 +0300
     3.2 +++ b/endpoint/pom.xml	Sat Sep 15 23:52:14 2012 +0300
     3.3 @@ -167,6 +167,7 @@
     3.4  							<directory>${basedir}/WebContent/WEB-INF</directory>
     3.5  							<includes>
     3.6  								<include>beans.xml</include>
     3.7 +								<include>connection.properties</include>
     3.8  							</includes>
     3.9  						</resource>
    3.10