<?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:p= "http://www.springframework.org/schema/p"
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:component-scan base-package= "com.ibs.gbplatform.common.memcached"/>
<bean id= "Memcachedpool" class= "Com.whalin.memcached.SockIOPool"
Factory-method= "getinstance" init-method= "Initialize" destroy-method= "ShutDown" >
<constructor-arg>
<value>memCachedPool</value>
</constructor-arg>
<property name= "Servers" >
<list>
<value>127.0.0.1:11211</value>
</list>
</property>
<property name= "Initconn" >
<value>20</value>
</property>
<property name= "Minconn" >
<value>10</value>
</property>
<property name= "Maxconn" >
<value>50</value>
</property>
<property name= "Maintsleep" >
<value>3000</value>
</property>
<property name= "Nagle" >
<value>false</value>
</property>
<property name= "Socketto" >
<value>3000</value>
</property>
</bean>
<bean id= "memcachedclient" class= "Com.whalin.memcached.MemCachedClient" >
<constructor-arg>
<value>memCachedPool</value>
</constructor-arg>
</bean>
</beans>
This article is from the "Jia Xiaoxian" blog, make sure to keep this source http://hackerxian.blog.51cto.com/9240575/1608490
Configuration file configuration for memcached