Exemplo n.º 1
0
  public Note queryById(String i) {
    Note note = new Note();
    RedisCachePool pool =
        redisCacheManager.getRedisPoolMap().get(RedisDataBaseType.defaultType.toString());
    Jedis jedis = pool.getResource();
    // 查询不用开启事物
    RedisDao rd = new RedisDao(jedis);
    note = (Note) rd.getBean("Note:" + i, note.getClass(), jedis);
    pool.returnResource(jedis);

    // dubbo 调用的时候防止java.sql.Blob cannot be assigned from null ,也就是blob字段不能为空
    note.setBlobContent(null);
    return note;
  }
Exemplo n.º 2
0
 private void delalBlob(List<Note> noteList) {
   for (Note note : noteList) {
     note.setBlobContent(null);
   }
 }