Spring集成spymemcached
Memcached的安装部署我就不介绍了!
首先下载spymemcached,下载地址:
jar:https://spymemcached.googlecode.com/files/spymemcached-2.10.3.jar
javadoc:https://spymemcached.googlecode.com/files/spymemcached-2.10.3-javadoc.jar
源码:https://spymemcached.googlecode.com/files/spymemcached-2.10.3-sources.jar
Spring的配置文件:config-cache.xml



    
        
        
        
            
                
            
        
        
        
        
        
            KETAMA_HASH
        
        
        
        
    

Spring的配置文件:config-service.xml


                    
                

Spring的源码:

@Component
public class ToKenCheckInterceptor extends AbstractWebServiceInterceptor implements InitializingBean {
    public static final String CSP_USER_SECURITY_CONTEXT_KEY = "CSP_USER_SECURITY_CONTEXT_KEY";
    public static final int HTTP_STATUS_INSUFFICIENT_USER_LEVEL = 431;
    @Autowired
    private MemcachedClient memcachedClient;
      
      
    public void setMemcachedClient(MemcachedClient memcachedClient) {
        this.memcachedClient = memcachedClient;
    }
    。。。  。。。