// Path: dingding-app-server-utils/src/main/java/com/mocoder/dingding/utils/bean/TypeRef.java
// public class TypeRef<T> extends TypeReference<T> {
// 
//     @Override
//     public int compareTo(TypeReference<T> o) {
//         return this.getType().equals(o.getType())?0:1;
//     }
// }
// 
// Path: dingding-app-server-utils/src/main/java/com/mocoder/dingding/utils/spring/SpringContextHolder.java
// public class SpringContextHolder implements ApplicationContextAware{
//     private static ApplicationContext context;
//     @Override
//     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
//         context = applicationContext;
//     }
// 
//     public static <T> T getBean(Class<T> claz){
//         return context.getBean(claz);
//     }
// 
//     public static <T> T getBean(String name){
//         return (T)context.getBean(name);
//     }
// }


import com.mocoder.dingding.utils.bean.TypeRef;
import com.mocoder.dingding.utils.spring.SpringContextHolder;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.LinkedHashMap;
import java.util.Map;
package com.mocoder.dingding.utils.web;



/**
 * Created by yangshuai on 16/1/31.
 */
public class RedisUtil {
    private static RedisTemplate redisTemplate;

    static {
// Path: dingding-app-server-utils/src/main/java/com/mocoder/dingding/utils/bean/TypeRef.java
// public class TypeRef<T> extends TypeReference<T> {
// 
//     @Override
//     public int compareTo(TypeReference<T> o) {
//         return this.getType().equals(o.getType())?0:1;
//     }
// }
// 
// Path: dingding-app-server-utils/src/main/java/com/mocoder/dingding/utils/spring/SpringContextHolder.java
// public class SpringContextHolder implements ApplicationContextAware{
//     private static ApplicationContext context;
//     @Override
//     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
//         context = applicationContext;
//     }
// 
//     public static <T> T getBean(Class<T> claz){
//         return context.getBean(claz);
//     }
// 
//     public static <T> T getBean(String name){
//         return (T)context.getBean(name);
//     }
// }


// Path: dingding-app-server-utils/src/main/java/com/mocoder/dingding/utils/web/RedisUtil.java
import com.mocoder.dingding.utils.bean.TypeRef;
import com.mocoder.dingding.utils.spring.SpringContextHolder;
import org.springframework.dao.DataAccessException;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.core.RedisCallback;
import org.springframework.data.redis.core.RedisTemplate;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.LinkedHashMap;
import java.util.Map;

package com.mocoder.dingding.utils.web;



/**
 * Created by yangshuai on 16/1/31.
 */
public class RedisUtil {
    private static RedisTemplate redisTemplate;

    static {
        redisTemplate = SpringContextHolder.getBean(RedisTemplate.class);