RedisPool操作Redis,工具类实例

redis.properties
配置文件内容
redis.pool.maxActive=100
redis.pool.maxIdle=20
redis.pool.maxWait=3000
redis.pool.testOnBorrow=false
redis.pool.testOnReturn=false

redis.ip=127.0.0.1
redis.port=6379
redis.port1=6380
redis.password=****

package com.szreach.rcrp.redis;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import java.util.Set;

import org.apache.log4j.Logger;

import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.JedisPool;
import redis.clients.jedis.JedisPoolConfig;
import redis.clients.jedis.JedisShardInfo;
import redis.clients.jedis.ShardedJedis;
import redis.clients.jedis.ShardedJedisPool;

public class RedisUtil {

   private static final Logger log = Logger.getLogger(RedisUtil.class);
   private static JedisPool jedisPool = null;
   private static ShardedJedisPool shardedJedisPool = null;
   /**
    * 初始化Redis连接池
    */
   static {
       try {
           // 加载redis配置文件
           ResourceBundle bundle = ResourceBundle.getBundle("redis");
           if (bundle == null) {
               throw new IllegalArgumentException(
                       "[redis.properties] is not found!");
           }
           int maxActivity = Integer.valueOf(bundle
                   .getString("redis.pool.maxActive"));
           int maxIdle = Integer.valueOf(bundle
                   .getString("redis.pool.maxIdle"));
           long maxWait = Long.valueOf(bundle.getString("redis.pool.maxWait"));
           boolean testOnBorrow = Boolean.valueOf(bundle
                   .getString("redis.pool.testOnBorrow"));
           boolean onreturn = Boolean.valueOf(bundle
                   .getString("redis.pool.testOnReturn"));
           // 创建jedis池配置实例
           JedisPoolConfig config = new JedisPoolConfig();
           // 设置池配置项值
           config.setMaxActive(maxActivity);
           config.setMaxIdle(maxIdle);  //最大空闲连接数
           config.setMaxWait(maxWait);
           config.setTestOnBorrow(testOnBorrow);
           config.setTestOnReturn(onreturn);
           jedisPool = new JedisPool(config, bundle.getString("redis.ip"),
                   Integer.valueOf(bundle.getString("redis.port")), 10000,
                   bundle.getString("redis.password"));
           // slave链接
           List<JedisShardInfo> shards = new ArrayList<JedisShardInfo>();
           shards.add(new JedisShardInfo(bundle.getString("redis.ip"), Integer
                   .valueOf(bundle.getString("redis.port1"))));
           shardedJedisPool = new ShardedJedisPool(config, shards);
           log.info("初始化Redis连接池success");
       } catch (Exception e) {
           log.error("初始化Redis连接池 出错!", e);
       }
   }

   /**
    * 获取Jedis实例
    * 
    * @return
    */
   public synchronized static Jedis getJedis() {
       try {
           if (jedisPool != null) {
               Jedis resource = jedisPool.getResource();
               return resource;
           } else {
               return null;
           }
       } catch (Exception e) {
           log.error("Redis缓存获取Jedis实例 出错!", e);
           return null;
       }
   }

   /**
    * 获取shardedJedis实例
    * 
    * @return
    */
   public static ShardedJedis getShardedJedis() {
       try {
           if (shardedJedisPool != null) {
               ShardedJedis resource = shardedJedisPool.getResource();
               return resource;
           } else {
               return null;
           }
       } catch (Exception e) {
           log.error("Redis缓存获取shardedJedis实例 出错!", e);
           return null;
       }
   }

   /**
    * 释放jedis资源
    * 
    * @param jedis
    */
   public static void returnResource(final Jedis jedis) {
       if (jedis != null) {
           jedisPool.returnResource(jedis);
       }
   }

   /**
    * 释放shardedJedis资源
    * 
    * @param jedis
    */
   public static void returnResource(final ShardedJedis shardedJedis) {
       if (shardedJedis != null) {
           shardedJedisPool.returnResource(shardedJedis);
       }
   }

   /**
    * 向缓存中设置字符串内容
    * 
    * @param key
    *            key
    * @param value
    *            value
    * @return
    * @throws Exception
    */
   public static boolean set(String key, String value) {
       Jedis jedis = null;
       try {
           jedis = getJedis();
           if(jedis != null){
               jedis.set(key, value);
           }
           return true;
       } catch (Exception e) {
           log.error("Redis缓存设置key值 出错!", e);
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * 判断key是否存在
    */
   public static boolean exists(String key){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis == null) {
               return false;
           } else {
               return jedis.exists(key);
           }
       } catch (Exception e) {
           log.error("Redis缓存判断key是否存在 出错!", e);
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * 删除缓存中的对象,根据key
    * @param key
    * @return
    */
   public static boolean del(String key) {
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.del(key);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   
   //*******************key-value****************start
   
   /**
    * 向缓存中设置对象
    * 
    * @param key
    * @param value
    * @return
    */
   public static boolean set(String key, Object value) {
       Jedis jedis = null;
       try {
           String objectJson = JSONObject.fromObject(value).toString();
           jedis = getJedis();
           if (jedis != null) {
               jedis.set(key, objectJson);
           }
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }

   /**
    * 根据key 获取内容
    * 
    * @param key
    * @return
    */
   public static Object get(String key) {
       ShardedJedis jedis = null;
       try {
           jedis = shardedJedisPool.getResource();
           Object value = jedis.get(key);
           return value;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           shardedJedisPool.returnResource(jedis);
       }
   }
   
   /**
    * 根据key 获取对象
    * 
    * @param key
    * @return
    */
   @SuppressWarnings("unchecked")
   public static <T> T get(String key, Class<T> clazz) {
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               return (T) JSONObject.toBean(JSONObject.fromObject(jedis.get(key)), clazz);
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   //*******************key-value****************end
   
   //*************** 操作list****************start
   /**
    * 向缓存中设置对象 
    * @param key
    * @param list
    * T string calss
    * @return
    */
   public static <T> boolean setList(String key,List<T> list){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           if (jedis != null) {
               for (T vz : list) {
                   if (vz instanceof String) {
                       jedis.lpush(key, (String) vz);
                   } else {
                       String objectJson = JSONObject.fromObject(vz).toString();
                       jedis.lpush(key, objectJson);
                   }
               }
               return true;
           } else {
               return false;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   
   @SuppressWarnings("unchecked")
   public static <T> List<T> getListEntity(String key,Class<T> entityClass){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               List<String> valueJson = jedis.lrange(key, 0, -1);
               JSONArray json = new JSONArray();
               json.addAll(valueJson);
               JSONArray jsonArray = JSONArray.fromObject(json.toString());
               return (List<T>) JSONArray.toCollection(jsonArray, entityClass);
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   public static List<String> getListString(String key){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               return jedis.lrange(key, 0, -1);
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   //*************** 操作list****************end
   
   //*************** 操作map****************start
   public static <K,V> boolean setMap(String key,Map<String,V> map){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           if (jedis != null) {
               Set<Map.Entry<String, V>> entry = map.entrySet();
               for (Iterator<Map.Entry<String, V>> ite = entry.iterator(); ite.hasNext();) {
                   Map.Entry<String, V> kv = ite.next();
                   if (kv.getValue() instanceof String) {
                       jedis.hset(key, kv.getKey(), (String) kv.getValue());
                   }else if (kv.getValue() instanceof List) {
                       jedis.hset(key, kv.getKey(), JSONArray.fromObject(kv.getValue()).toString());
                   } else {
                       jedis.hset(key, kv.getKey(), JSONObject.fromObject(kv.getValue()).toString());
                   }
               }
               return true;
           } else {
               return false;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   public static boolean setMapKey(String key,String mapKey,Object value){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           if (jedis != null) {
               if (value instanceof String) {
                   jedis.hset(key, mapKey, String.valueOf(value));
               } else if (value instanceof List) {
                   jedis.hset(key, mapKey, JSONArray.fromObject(value).toString());
               } else {
                   jedis.hset(key, mapKey, JSONObject.fromObject(value).toString());
               }
               return true;
           } else {
               return false;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * seconds key和value 保存的有效时间(单位:秒)
    * @return
    */
   public static boolean setMapKeyExpire(String key,String mapKey,Object value, int seconds){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           if (jedis != null) {
               if (value instanceof String) {
                   jedis.hset(key, mapKey, String.valueOf(value));
               } else if (value instanceof List) {
                   jedis.hset(key, mapKey, JSONArray.fromObject(value).toString());
               } else {
                   jedis.hset(key, mapKey, JSONObject.fromObject(value).toString());
               }
               jedis.expire(key, seconds);
               return true;
           } else {
               return false;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   @SuppressWarnings("unchecked")
   public static <K,V> Map<String,V> getMap(String key){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               Map<String, V> map = (Map<String, V>) jedis.hgetAll(key);
               return map;
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   @SuppressWarnings("unchecked")
   public static <K,V> Map<String,V> getMapEntityClass(String key,Class<V> clazz){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               Map<String, V> map = (Map<String, V>) jedis.hgetAll(key);
               Set<Map.Entry<String, V>> entry = map.entrySet();
               for (Iterator<Map.Entry<String, V>> ite = entry.iterator(); ite.hasNext();) {
                   Map.Entry<String, V> kv = ite.next();
                   map.put(kv.getKey(), (V) JSONObject.toBean(JSONObject.fromObject(kv.getValue()), clazz));
               }
               return map;
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   @SuppressWarnings("unchecked")
   public static <K,V> Map<String,List<V>> getMapList(String key,Class<V> clazz){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               Map<String, V> map = (Map<String, V>) jedis.hgetAll(key);
               Set<Map.Entry<String, V>> entry = map.entrySet();
               for (Iterator<Map.Entry<String, V>> ite = entry.iterator(); ite.hasNext();) {
                   Map.Entry<String, V> kv = ite.next();
                   JSONArray jsonArray = JSONArray.fromObject(kv.getValue());
                   map.put(kv.getKey(), (V) JSONArray.toCollection(jsonArray, clazz));
               }
               return (Map<String, List<V>>) map;
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   @SuppressWarnings("unchecked")
   public static <T> List<T> getMapKeyListEntity(String key,String mapKey,
           Class<T> entityClass){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if (jedis != null) {
               String valueJson = jedis.hget(key, mapKey);
               JSONArray jsonArray = JSONArray.fromObject(valueJson);
               return (List<T>) JSONArray.toCollection(jsonArray, entityClass);
           } else {
               return null;
           }
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   @SuppressWarnings("unchecked")
   public static <T> T getMapKeyEntity(String key,String mapKey,
           Class<T> entityClass){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if(jedis != null){
           String valueJson=jedis.hget(key, mapKey);
           return (T) JSONObject.toBean(JSONObject.fromObject(valueJson), entityClass);
           }else{return null;}
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   public static Object getMapKey(String key,String mapKey){
       ShardedJedis jedis = null;
       try {
           jedis = getShardedJedis();
           if(jedis != null){
           return jedis.hget(key, mapKey);
           }else{return null;}
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   public static boolean delMapKey(String key,String mapKey){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.hdel(key, mapKey);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   public static boolean hexists(String key,String mapKey){
       ShardedJedis jedis = null;
       try {
           jedis = shardedJedisPool.getResource();
           return jedis.hexists(key,mapKey);
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           shardedJedisPool.returnResource(jedis);
       }
   }
   //*************** 操作map****************end
   
   //***************计数器应用INCR,DECR****************begin
   //Redis的命令都是原子性的,你可以轻松地利用INCR,DECR命令来构建计数器系统
   
   /**
    * incr(key):名称为key的string增1操作
    */
   public static boolean incr(String key){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.incr(key);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * incrby(key, integer):名称为key的string增加integer
    */
   public static boolean incrBy(String key, int value){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.incrBy(key, value);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * decr(key):名称为key的string减1操作
    */
   public static boolean decr(String key){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.decr(key);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * decrby(key, integer):名称为key的string减少integer
    */
   public static boolean decrBy(String key, int value){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.decrBy(key, value);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   //***************计数器应用INCR,DECR****************end
   
   //***************使用sorted set(zset)甚至可以构建有优先级的队列系统***************begin
   /**
    * 向名称为key的zset中添加元素member,score用于排序。
    * 如果该元素已经存在,则根据score更新该元素的顺序
    */
   public static boolean zadd(String key, double score, String member){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.zadd(key, score, member);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * 删除名称为key的zset中的元素member
    */
   public static boolean zrem(String key, String... members){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.zrem(key, members);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * 返回集合中score在给定区间的元素
    */
   public static Set<String> zrangeByScore(String key, double min, double max){
       ShardedJedis jedis = null;
       try {
           jedis = shardedJedisPool.getResource();
           return jedis.zrangeByScore(key, min, max);
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   //***************使用sorted set(zset)甚至可以构建有优先级的队列系统***************end
   
   //***************sorted set 处理***************************************begin
   //zset 处理
   public static boolean zaddObject(String key, double score, Object value){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           String objectJson = JSONObject.fromObject(value).toString();
           jedis.zadd(key, score, objectJson);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * score值递减(从大到小)次序排列。
    * @param key
    * @param max score
    * @param min score
    * @param entityClass
    * @return
    */
   @SuppressWarnings("unchecked")
   public static  <T> List<T> zrevrangeByScore(String key,double max,double min, 
           Class<T> entityClass){
       ShardedJedis jedis = null;
       try {
           jedis =shardedJedisPool.getResource();
           Set<String> set=jedis.zrevrangeByScore(key, max, min);
           List<T> list=new ArrayList<T>();
           for (String str : set) {  
               list.add((T) JSONObject.toBean(JSONObject.fromObject(str), entityClass));
           } 
           return list;
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   /**
    * score值递减(从大到小)次序排列。
    * @param key
    * @param max score
    * @param min score
    * @param offset count (类似mysql的 LIMIT)
    * @param entityClass
    * @return
    */
   @SuppressWarnings("unchecked")
   public static  <T> List<T> zrevrangeByScore(String key,double max,double min,
           int offset, int count,Class<T> entityClass){
       ShardedJedis jedis = null;
       try {
           jedis =shardedJedisPool.getResource();
           Set<String> set=jedis.zrevrangeByScore(key, max, min,offset,count);
           List<T> list=new ArrayList<T>();
           for (String str : set) {  
               list.add((T) JSONObject.toBean(JSONObject.fromObject(str), entityClass));
           } 
           return list;
       } catch (Exception e) {
           e.printStackTrace();
           return null;
       } finally {
           returnResource(jedis);
       }
   }
   
   
   //得到总记录数
   public static long zcard(String key){
       ShardedJedis jedis = null;
       try {
           jedis =shardedJedisPool.getResource();
           return jedis.zcard(key);
       } catch (Exception e) {
           e.printStackTrace();
           return 0;
       } finally {
           returnResource(jedis);
       }
   }
   
   //删除 元素
   public static  boolean zremObject(String key, Object value){
       Jedis jedis = null;
       try {
           jedis = getJedis();
           String objectJson = JSONObject.fromObject(value).toString();
           jedis.zrem(key, objectJson);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }
   
   //统计zset集合中score某个范围内(1-5),元素的个数
   public static long zcount(String key,double min, double max){
       ShardedJedis jedis = null;
       try {
           jedis =shardedJedisPool.getResource();
           return jedis.zcount(key,min,max);
       } catch (Exception e) {
           e.printStackTrace();
           return 0;
       } finally {
           returnResource(jedis);
       }
   }
   
   //查看zset集合中元素的score
   public static double zscore(String key,Object value){
       ShardedJedis jedis = null;
       try {
           jedis =shardedJedisPool.getResource();
           String objectJson = JSONObject.fromObject(value).toString();
           return jedis.zscore(key,objectJson);
       } catch (Exception e) {
           e.printStackTrace();
           return 0;
       } finally {
           returnResource(jedis);
       }
   }
   //**************sorted set******************************************end
   
   //***********************Redis Set集合操作**************************begin
   /**
    * sadd:向名称为Key的set中添加元素,同一集合中不能出现相同的元素值。(用法:sadd set集合名称 元素值)
    * @param key
    * @param value
    * @return
    */
   public static boolean sadd(String key, String value) {
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.sadd(key, value);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }

   /**
    * srem:删除名称为key的set中的元素。(用法:srem set集合名称 要删除的元素值)
    * 
    * @param key
    * @param value
    * @return
    */
   public static boolean srem(String key, String value) {
       Jedis jedis = null;
       try {
           jedis = getJedis();
           jedis.srem(key, value);
           return true;
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }

   /**
    * sdiff:返回所有给定key与第一个key的差集。(用法:sdiff set集合1 set集合2)
    * 
    * @param key1
    * @param key2
    * @return
    */
   public static Set<String> sdiff(String key1, String key2) {
       Jedis jedis = null;
       Set<String> diffList = null;
       try {
           jedis = getJedis();
           diffList = jedis.sdiff(key1, key2);
       } catch (Exception e) {
           e.printStackTrace();
       } finally {
           returnResource(jedis);
       }
       return diffList;
   }

   /**
    * sismember:判断某个值是否是集合的元素。(用法:sismember 集合1 指定的元素值)
    * 
    * @param key
    * @param value
    * @return
    */
   public static boolean sismember(String key, String value) {
       ShardedJedis jedis = null;
       try {
           jedis = shardedJedisPool.getResource();
           return jedis.sismember(key, value);
       } catch (Exception e) {
           e.printStackTrace();
           return false;
       } finally {
           returnResource(jedis);
       }
   }

   /**
    * smembers(key) :返回名称为key的set的所有元素
    * 
    * @param key
    * @return
    */
   public static Set<String> smembers(String key) {
       Jedis jedis = null;
       Set<String> list = null;
       try {
           jedis = getJedis();
           list = jedis.smembers(key);
       } catch (Exception e) {
           e.printStackTrace();
       } finally {
           returnResource(jedis);
       }
       return list;
   }
   
   //***********************Redis Set集合操作****************************end
}
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 222,378评论 6 516
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 94,970评论 3 399
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 168,983评论 0 362
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 59,938评论 1 299
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 68,955评论 6 398
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 52,549评论 1 312
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 41,063评论 3 422
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 39,991评论 0 277
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 46,522评论 1 319
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 38,604评论 3 342
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 40,742评论 1 353
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 36,413评论 5 351
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 42,094评论 3 335
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 32,572评论 0 25
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 33,671评论 1 274
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 49,159评论 3 378
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 45,747评论 2 361

推荐阅读更多精彩内容