DATACOUCH-57 - Allow for the configuration of CouchbaseClient to use properties
from property files or SPEL expressions.
This commit is contained in:
committed by
Michael Nitschinger
parent
7b6a3a9894
commit
bb6385e08a
@@ -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>
|
||||
|
||||
3
src/test/resources/namespace/couchbase.properties
Normal file
3
src/test/resources/namespace/couchbase.properties
Normal file
@@ -0,0 +1,3 @@
|
||||
couchbase.host=127.0.0.1
|
||||
couchbase.bucket=default
|
||||
couchbase.password=
|
||||
Reference in New Issue
Block a user