DATACOUCH-57 - Allow for the configuration of CouchbaseClient to use properties

from property files or SPEL expressions.
This commit is contained in:
Ken Dombeck
2013-12-12 15:43:34 -06:00
committed by Michael Nitschinger
parent 7b6a3a9894
commit bb6385e08a
6 changed files with 86 additions and 68 deletions

View File

@@ -2,8 +2,12 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:couchbase="http://www.springframework.org/schema/data/couchbase"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/data/couchbase http://www.springframework.org/schema/data/couchbase/spring-couchbase.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:property-placeholder location="classpath:/namespace/couchbase.properties"/>
<couchbase:couchbase/>
@@ -13,4 +17,5 @@
<bean id="myCustomObjectMapper" class="com.fasterxml.jackson.databind.ObjectMapper"/>
</beans>
<couchbase:couchbase id="couchbase3" host="${couchbase.host}" bucket="${couchbase.bucket}" password="${couchbase.password}" />
</beans>

View File

@@ -0,0 +1,3 @@
couchbase.host=127.0.0.1
couchbase.bucket=default
couchbase.password=