# spring-memcached
**Repository Path**: xujieyang/spring-memcached
## Basic Information
- **Project Name**: spring-memcached
- **Description**: spring memcached
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2016-03-02
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#spring-memcached使用
### 1 在spring中定义
```xml
TEXT
KETAMA_HASH
ARRAY_MOD
```
### 2. 测试使用
```java
package com.xjy.spring.memcached;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import com.xjy.spring.memcached.core.MemcachedTemplate;
public class TestSpringDataMemcached {
public static void main(String[] args) {
ClassPathXmlApplicationContext ac = new ClassPathXmlApplicationContext("classpath:spring.xml");
MemcachedTemplate memcachedTemplate = ac.getBean("xmemcachedTemplate", MemcachedTemplate.class);
memcachedTemplate.opsForValue().set("TestSpringDataMemcached_111", 0, "TestSpringDataMemcached_111");
System.out.println(memcachedTemplate.opsForValue().get("TestSpringDataMemcached_111"));
ac.destroy();
}
}
```