forked from heroku/devcenter-memcache-java
/
applicationContext.xml
31 lines (26 loc) · 1.29 KB
/
applicationContext.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?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:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<context:annotation-config/>
<context:property-placeholder/>
<bean id="plainCallbackHandler" class="net.spy.memcached.auth.PlainCallbackHandler">
<constructor-arg index="0" value="${MEMCACHE_USERNAME}"/>
<constructor-arg index="1" value="${MEMCACHE_PASSWORD}"/>
</bean>
<bean id="authDescriptor" class="net.spy.memcached.auth.AuthDescriptor">
<constructor-arg index="0">
<array><value>PLAIN</value></array>
</constructor-arg>
<constructor-arg index="1" ref="plainCallbackHandler"/>
</bean>
<bean id="memcachedClient" class="net.spy.memcached.spring.MemcachedClientFactoryBean">
<property name="servers" value="${MEMCACHE_SERVERS}:11211"/>
<property name="protocol" value="BINARY"/>
<property name="authDescriptor" ref="authDescriptor"/>
</bean>
</beans>