redis 批量导入数据

redis 批量导入数据

 @Test
    public void importEs29() throws Exception {
        List list=new ArrayList<>();
        list.add(new Dict().setCustomerId("1").setTagIdList("hello world"));
        list.add(new Dict().setCustomerId("2").setTagIdList("java python"));
        //批量set数据
        redisTemplate.executePipelined(new RedisCallback() {
            @Override
            public String doInRedis(RedisConnection connection)  {
                for (int i=0;i

 

你可能感兴趣的:(数据库)