• StringRedisTemplate与RedisTemplate的区别,以及Redis的工具类封装


    StringRedisTemplate与RedisTemplate区别点

    • 两者的关系是StringRedisTemplate继承RedisTemplate。
    • 两者的数据是不共通的;也就是说StringRedisTemplate只能管理StringRedisTemplate里面的数据,RedisTemplate只能管理RedisTemplate中的数据。
    • RedisTemplate使用的是JdkSerializationRedisSerializer序列化类,存入数据会将数据先序列化成字节数组然后在存入Redis数据库。 StringRedisTemplate使用的是StringRedisSerializer序列化类
    • 当redis数据库里面本来存的是字符串数据或者要存取的数据就是字符串类型数据的时候,那么使用StringRedisTemplate即可。但是如果你的数据是复杂的对象类型,而取出的时候又不想做任何的数据转换,直接从Redis里面取出一个对象,那么使用RedisTemplate是更好的选择。
    • redisTemplate 中存取数据都是字节数组。当redis中存入的数据是可读形式而非字节数组时,使用redisTemplate取值的时候会无法获取导出数据,获得的值为null。可以使用 StringRedisTemplate 试试

    RedisTemplate中定义了5种数据结构操作:

    redisTemplate.opsForValue();  //操作字符串
    redisTemplate.opsForHash();   //操作hash
    redisTemplate.opsForList();   //操作list
    redisTemplate.opsForSet();    //操作set
    redisTemplate.opsForZSet();   //操作有序set
    
    • 1
    • 2
    • 3
    • 4
    • 5

    StringRedisTemplate常用操作

    // 向redis里存入数据和设置缓存时间  
    stringRedisTemplate.opsForValue().set("test", "100", 60*10, TimeUnit.SECONDS);
    
    // val做-1操作
    stringRedisTemplate.boundValueOps("test").increment(-1); 
    
    // 根据key获取缓存中的val
    stringRedisTemplate.opsForValue().get("test") 
    
    // val + 1
    stringRedisTemplate.boundValueOps("test").increment(1); 
    
    // 根据key获取过期时间
    stringRedisTemplate.getExpire("test") 
    
    // 根据key获取过期时间并换算成指定单位 
    stringRedisTemplate.getExpire("test",TimeUnit.SECONDS); 
    
    // 根据key删除缓存
    stringRedisTemplate.delete("test"); 
    
    // 检查key是否存在,返回boolean值
    stringRedisTemplate.hasKey("546545");  
    
    // 向指定key中存放set集合
    stringRedisTemplate.opsForSet().add("red_123`在这里插入代码片`", "1", "2", "3"); 
    
    // 设置过期时间
    stringRedisTemplate.expire("red_123", 1000 , TimeUnit.MILLISECONDS); 
    
    // 根据key查看集合中是否存在指定数据
    stringRedisTemplate.opsForSet().isMember("red_123", "1"); 
    
    // 根据key获取set集合
    stringRedisTemplate.opsForSet().members("red_123"); 
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35

    基于StringRedisTemplate封装一个缓存工具类,满足下列需求:

    • 方法1:将任意Java对象序列化为json并存储在string类型的key中,并且可以设置TTL过期时间
    • 方法2:将任意Java对象序列化为json并存储在string类型的key中,并且可以设置逻辑过期时间,用于处理缓存击穿问题
    • 方法3:根据指定的key查询缓存,并反序列化为指定类型,利用缓存空值的方式解决缓存穿透问题
    • 方法4:根据指定的key查询缓存,并反序列化为指定类型,需要利用逻辑过期解决缓存击穿问题

    以下封装涉及到了缓存穿透与缓存击穿的解决方案,如果对两者不熟悉,可以看看我的另一篇博客了解一下这些解决方案:数据库面试题——redis缓存穿透、缓存击穿与缓存雪崩

    依赖:

            <dependency>
                <groupId>cn.hutool</groupId>
                <artifactId>hutool-all</artifactId>
                <version>5.7.17</version>
            </dependency>
    
    • 1
    • 2
    • 3
    • 4
    • 5

    还需要一个模型:

    @Data
    public class RedisData {
        private LocalDateTime expireTime;
        private Object data;
    }
    
    • 1
    • 2
    • 3
    • 4
    • 5

    封装:

    @Component
    @Slf4j
    public class RedisUtils {
    
        @Autowired
        private static RedisTemplate<String, Object> redisTemplate;
    
        private final StringRedisTemplate stringRedisTemplate;
    
        // 防止缓存穿透而设置的空值的过期时间
        private final Long CACHE_NULL_TTL = 2L;
    
        // 防止缓存穿透而设置的空值的过期时间的单位
        private final TimeUnit CACHE_UNIT = TimeUnit.MINUTES;
    
        // 互斥锁
        private final String LOCK_APP_KEY = "lock:app:";
    
        private static final ExecutorService CACHE_REBUILD_EXECUTOR = Executors.newFixedThreadPool(10);
    
        public RedisUtils(StringRedisTemplate stringRedisTemplate) {
            this.stringRedisTemplate = stringRedisTemplate;
        }
    
        // =============================common============================
    
        /**
         * 指定缓存失效时间
         * @param key  键
         * @param time 时间(秒)
         * @return boolean
         */
        public boolean expire(String key, long time) {
            if (time <= 0) return false;
            redisTemplate.expire(key, time, TimeUnit.SECONDS);
            return true;
        }
    
        /**
         * 根据key 获取过期时间,单位为秒
         * @param key 键 不能为null
         * @return 时间(秒) 返回0代表为永久有效
         */
        public Long getExpire(String key) {
            return redisTemplate.getExpire(key, TimeUnit.SECONDS);
        }
    
        /**
         * 根据key 获取过期时间,并指定时间单位
         * @param key 键 不能为null
         * @return 时间(秒) 返回0代表为永久有效
         */
        public Long getExpire(String key, TimeUnit unit) {
            return redisTemplate.getExpire(key, unit);
        }
    
        /**
         * 判断key是否存在
         * @param key 键
         * @return true 存在 false不存在
         */
        public boolean hasKey(String key) {
            return Boolean.TRUE.equals(redisTemplate.hasKey(key));
        }
    
        /**
         * 删除缓存
         * @param key 可以传一个值 或多个
         */
        public boolean del(String... key) {
            if (key != null && key.length > 0) {
                if (key.length == 1) {
                    redisTemplate.delete(key[0]);
                } else {
                    redisTemplate.delete(Arrays.asList(key));
                }
                return true;
            }
            return false;
        }
    
        /**
         * 根据 key 前缀批量删除
         * @param prefix 前缀
         */
        public boolean DelByPrefix(String prefix) {
            Set<String> keys = redisTemplate.keys(prefix + "*");
            if(Objects.nonNull(keys)) {
                redisTemplate.delete(keys);
                return true;
            }
            return false;
        }
    
        // ============================String=============================
    
        /**
         * 普通缓存获取
         * @param key
         * @return
         */
        public Object get(String key) {
            return key == null ? null : redisTemplate.opsForValue().get(key);
        }
    
        /**
         * 普通缓存写入
         * @param key
         * @param value
         * @return
         */
        public boolean set(String key, Object value) {
            try {
                redisTemplate.opsForValue().set(key, value);
                return true;
            } catch (Exception e) {
                log.error("缓存写入错误!key:{},value:{},错误信息:{}", key, value, e.getMessage());
                return false;
            }
        }
    
        /**
         * 普通缓存写入并设置过期时间
         * @param key
         * @param value
         * @param time  时间(秒) 如果time小于等于0,则设置不过期
         * @return
         */
        public boolean set(String key, Object value, long time) {
            try {
                if (time > 0) {
                    redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS);
                } else {
                    set(key, value);
                }
                return true;
            } catch (Exception e) {
                log.error("缓存写入错误!key:{},value:{},time:{},错误信息:{}", key, value, time, e.getMessage());
                return false;
            }
        }
    
        /**
         * 递增,默认+1
         * @param key
         * @return
         */
        public Long incr(String key) {
            return redisTemplate.opsForValue().increment(key, 1);
        }
    
        /**
         * 递增,自定义递增步长
         * @param key   键
         * @param step 步长
         * @return
         */
        public Long incr(String key, long step) {
            return redisTemplate.opsForValue().increment(key, step);
        }
    
        /**
         * 递减,默认-1
         * @param key
         * @return
         */
        public Long decr(String key) {
            return redisTemplate.opsForValue().increment(key, -1);
        }
    
        /**
         * 递减,默认-1
         * @param key
         * @param step 步长
         * @return
         */
        public Long decr(String key, long step) {
            return redisTemplate.opsForValue().increment(key, -step);
        }
    
        // ================================Map=================================
    
        /**
         * HashGet
         * @param key
         * @param item
         * @return
         */
        public Object hget(String key, String item) {
            return redisTemplate.opsForHash().get(key, item);
        }
    
        /**
         * 获取hashKey对应的所有键值
         * @param key 键
         * @return 对应的多个键值
         */
        public Map<Object, Object> hmget(String key) {
            return redisTemplate.opsForHash().entries(key);
        }
    
        /**
         * HashSet
         * @param key
         * @param map
         * @return
         */
        public boolean hmset(String key, Map<String, Object> map) {
            try {
                redisTemplate.opsForHash().putAll(key, map);
                return true;
            } catch (Exception e) {
                e.printStackTrace();
                return false;
            }
        }
    
        /**
         * HashSet 并设置过期时间
         * @param key
         * @param map
         * @param time 如果小于等于0,则不设置过期时间,单位为秒
         * @return
         */
        public boolean hmset(String key, Map<String, Object> map, long time) {
            try {
                redisTemplate.opsForHash().putAll(key, map);
                if (time > 0) {
                    expire(key, time);
                }
                return true;
            } catch (Exception e) {
                log.error("HashSet写入错误!key:{},map:{},time:{},错误信息:{}", key, map, time, e.getMessage());
                return false;
            }
        }
    
        /**
         * 向一张hash表中放入数据,如果不存在将创建
         * @param key
         * @param item
         * @param value
         * @return
         */
        public boolean hset(String key, String item, Object value) {
            try {
                redisTemplate.opsForHash().put(key, item, value);
                return true;
            } catch (Exception e) {
                log.error("hset写入错误!key:{},item:{},value:{},错误信息:{}", key, item, value, e.getMessage());
                return false;
            }
        }
    
        /**
         * 向一张hash表中放入数据并设置过期时间,如果不存在将创建
         * @param key
         * @param item
         * @param value
         * @param time  时间(秒) 注意:如果已存在的hash表有时间,这里将会替换原有的时间
         * @return
         */
        public boolean hset(String key, String item, Object value, long time) {
            try {
                redisTemplate.opsForHash().put(key, item, value);
                if (time > 0) {
                    expire(key, time);
                }
                return true;
            } catch (Exception e) {
                log.error("hset写入错误!key:{},item:{},value:{},time:{},错误信息:{}", key, item, value, time, e.getMessage());
                return false;
            }
        }
    
        /**
         * 删除hash表中的值
         * @param key
         * @param item
         */
        public boolean hdel(String key, Object... item) {
            try {
                redisTemplate.opsForHash().delete(key, item);
                return true;
            } catch (Exception e) {
                log.error("hdel删除错误!key:{},item:{},错误信息:{}", key, item, e.getMessage());
                return false;
            }
        }
    
        /**
         * 判断hash表中是否有该项的值
         * @param key
         * @param item
         * @return
         */
        public boolean hHasKey(String key, String item) {
            return redisTemplate.opsForHash().hasKey(key, item);
        }
    
        /**
         * hash递增 如果不存在,就会创建一个 并把新增后的值返回
         * @param key
         * @param item
         * @param step  步长
         * @return
         */
        public double hincr(String key, String item, double step) {
            return redisTemplate.opsForHash().increment(key, item, step);
        }
    
        /**
         * hash递减
         * @param key
         * @param item
         * @param step  步长
         * @return
         */
        public double hdecr(String key, String item, double step) {
            return redisTemplate.opsForHash().increment(key, item, -step);
        }
    
        // ============================set=============================
    
        /**
         * 根据key获取Set中的所有值
         * @param key
         * @return
         */
        public Set<Object> sGet(String key) {
            try {
                return redisTemplate.opsForSet().members(key);
            } catch (Exception e) {
                log.error("sGet获取错误!key:{},错误信息:{}", key, e.getMessage());
                return null;
            }
        }
    
        /**
         * 查询指定set是否存在value
         * @param key
         * @param value
         * @return
         */
        public boolean sHasKey(String key, Object value) {
            try {
                return Boolean.TRUE.equals(redisTemplate.opsForSet().isMember(key, value));
            } catch (Exception e) {
                log.error("sHasKey查询错误!key:{},value:{},错误信息:{}", key, value, e.getMessage());
                return false;
            }
        }
    
        /**
         * 将set数据写入缓存
         *
         * @param key
         * @param values
         * @return 成功个数
         */
        public Long sSet(String key, Object... values) {
            try {
                return redisTemplate.opsForSet().add(key, values);
            } catch (Exception e) {
                log.error("sSet写入错误!key:{},values:{},错误信息:{}", key, values, e.getMessage());
                return null;
            }
        }
    
        /**
         * 将set数据写入缓存并设置过期时间
         * @param key
         * @param time  小于等于0则不设置过期
         * @param values
         * @return 成功个数
         */
        public Long sSetAndTime(String key, long time, Object... values) {
            try {
                Long count = redisTemplate.opsForSet().add(key, values);
                if (time > 0) expire(key, time);
                return count;
            } catch (Exception e) {
                log.error("sSet写入错误!key:{},time:{},values:{},错误信息:{}", key, time, values, e.getMessage());
                return null;
            }
        }
    
        /**
         * 获取set缓存的长度
         * @param key
         * @return
         */
        public Long sGetSetSize(String key) {
            try {
                return redisTemplate.opsForSet().size(key);
            } catch (Exception e) {
                log.error("sGetSetSize获取错误!key:{},错误信息:{}", key, e.getMessage());
                return null;
            }
        }
    
        /**
         * 批量移除指定键值对
         * @param key
         * @param values
         * @return 移除成功个数
         */
        public Long setRemove(String key, Object... values) {
            try {
                return redisTemplate.opsForSet().remove(key, values);
            } catch (Exception e) {
                log.error("setRemove移除错误!key:{},values:{},错误信息:{}", key, values, e.getMessage());
                return null;
            }
        }
    
        // ===============================list=================================
    
        /**
         * 获取list缓存的内容
         * @param key
         * @param start
         * @param end  0到-1代表所有值
         * @return
         */
        public List<Object> lGet(String key, long start, long end) {
            try {
                return redisTemplate.opsForList().range(key, start, end);
            } catch (Exception e) {
                log.error("lGet获取错误!key:{},start:{},end:{},错误信息:{}", key, start, end, e.getMessage());
                return null;
            }
        }
    
        /**
         * 获取list缓存的长度
         * @param key 键
         * @return
         */
        public Long lGetListSize(String key) {
            try {
                return redisTemplate.opsForList().size(key);
            } catch (Exception e) {
                log.error("lGetListSize获取错误!key:{},错误信息:{}", key, e.getMessage());
                return null;
            }
        }
    
        /**
         * 通过索引 获取list中的值
         * @param key
         * @param index index>=0时, 0 表头,1 第二个元素,依次类推;index<0时,-1,表尾,-2倒数第二个元素,依次类推
         * @return
         */
        public Object lGetIndex(String key, long index) {
            try {
                return redisTemplate.opsForList().index(key, index);
            } catch (Exception e) {
                log.error("lGetIndex获取错误!key:{},index:{},错误信息:{}", key, index, e.getMessage());
                return null;
            }
        }
    
        /**
         * 将value写入list缓存
         * @param key   键
         * @param value 值
         * @return
         */
        public boolean lSet(String key, Object value) {
            try {
                redisTemplate.opsForList().rightPush(key, value);
                return true;
            } catch (Exception e) {
                log.error("lSet写入错误!key:{},value:{},错误信息:{}", key, value, e.getMessage());
                return false;
            }
        }
    
        /**
         * 将value写入list缓存并设置过期时间
         * @param key
         * @param value
         * @param time  小于等于0则不设置过期
         * @return
         */
        public boolean lSet(String key, Object value, long time) {
            try {
                redisTemplate.opsForList().rightPush(key, value);
                if (time > 0) expire(key, time);
                return true;
            } catch (Exception e) {
                log.error("lSet写入错误!key:{},value:{},time:{},错误信息:{}", key, value, time, e.getMessage());
                return false;
            }
        }
    
        /**
         * 将list写入缓存
         * @param key
         * @param value
         * @return
         */
        public boolean lSet(String key, List<Object> value) {
            try {
                redisTemplate.opsForList().rightPushAll(key, value);
                return true;
            } catch (Exception e) {
                log.error("lSet写入错误!key:{},value:{},错误信息:{}", key, value, e.getMessage());
                return false;
            }
        }
    
        /**
         * 将list写入缓存并设置过期时间
         * @param key
         * @param value
         * @param time  小于等于0则不设置过期
         * @return
         */
        public boolean lSet(String key, List<Object> value, long time) {
            try {
                redisTemplate.opsForList().rightPushAll(key, value);
                if (time > 0) expire(key, time);
                return true;
            } catch (Exception e) {
                log.error("lSet写入错误!key:{},value:{},time:{},错误信息:{}", key, value, time, e.getMessage());
                return false;
            }
        }
    
        /**
         * 根据索引修改list中的某条数据
         * @param key
         * @param index
         * @param value
         * @return
         */
        public boolean lUpdateIndex(String key, long index, Object value) {
            try {
                redisTemplate.opsForList().set(key, index, value);
                return true;
            } catch (Exception e) {
                log.error("lUpdateIndex更新错误!key:{},index:{},value:{},错误信息:{}", key, index, value, e.getMessage());
                return false;
            }
        }
    
        /**
         * 移除list中N个值为value的元素
         * @param key
         * @param count 移除数量
         * @param value
         * @return 移除成功的个数
         */
        public Long lRemove(String key, long count, Object value) {
            try {
                return redisTemplate.opsForList().remove(key, count, value);
            } catch (Exception e) {
                log.error("lRemove移除错误!key:{},count:{},value:{},错误信息:{}", key, count, value, e.getMessage());
                return null;
            }
        }
    
        public void setString(String key, Object value, Long time, TimeUnit unit) {
            stringRedisTemplate.opsForValue().set(key, JSONUtil.toJsonStr(value), time, unit);
        }
    
        /**
         * 逻辑过期
         * @param key
         * @param value
         * @param time  过期时间
         * @param unit  过期时间单位
         */
        public void setWithLogicalExpire(String key, Object value, Long time, TimeUnit unit) {
            RedisData redisData = new RedisData();
            redisData.setData(value);
            redisData.setExpireTime(LocalDateTime.now().plusSeconds(unit.toSeconds(time)));
            stringRedisTemplate.opsForValue().set(key, JSONUtil.toJsonStr(redisData));
        }
    
        /**
         * 取数据(缓存空值防止缓存穿透)
         * @param keyPrefix key前缀
         * @param id  id
         * @param type  id类型
         * @param dbFallback  缓存不存在,则通过该函数新建缓存
         * @param time  写入缓存的过期时间
         * @param unit  写入缓存的过期时间单位
         * @param 
         * @param 
         * @return
         */
        public <R,ID> R getWithPassThrough(
                String keyPrefix,
                ID id,
                Class<R> type,
                Function<ID, R> dbFallback,
                Long time,
                TimeUnit unit
        ){
            String key = keyPrefix + id;
            String json = stringRedisTemplate.opsForValue().get(key);
            if (StrUtil.isNotBlank(json)) {
                return JSONUtil.toBean(json, type);
            }
            if (json != null) {
                return null;
            }
            // id不存在,去数据库查询
            R r = dbFallback.apply(id);
            if (r == null) {
                // 数据不存在,则存空值,防止缓存穿透
                stringRedisTemplate.opsForValue().set(key, "", CACHE_NULL_TTL, CACHE_UNIT);
                return null;
            }
            // 数据存在,则写入缓存
            this.setString(key, r, time, unit);
            return r;
        }
    
        /**
         * 取数据(逻辑过期防止缓存击穿)
         * @param keyPrefix
         * @param id
         * @param type
         * @param dbFallback
         * @param time
         * @param unit
         * @param 
         * @param 
         * @return
         */
        public <R, ID> R getWithLogicalExpire(
                String keyPrefix,
                ID id,
                Class<R> type,
                Function<ID, R> dbFallback,
                Long time,
                TimeUnit unit
        ) {
            String key = keyPrefix + id;
            String json = stringRedisTemplate.opsForValue().get(key);
            if (StrUtil.isBlank(json)) {
                return null;
            }
            // 命中,需要先把json反序列化为对象
            RedisData redisData = JSONUtil.toBean(json, RedisData.class);
            R r = JSONUtil.toBean((JSONObject) redisData.getData(), type);
            LocalDateTime expireTime = redisData.getExpireTime();
            if(expireTime.isAfter(LocalDateTime.now())) {
                // 未过期,直接返回信息
                return r;
            }
            // 缓存重建,获取互斥锁
            String lockKey = LOCK_APP_KEY + id;
            boolean isLock = tryLock(lockKey);
            if (isLock){
                // 成功获取锁,开启独立线程,实现缓存重建
                CACHE_REBUILD_EXECUTOR.submit(() -> {
                    try {
                        R newR = dbFallback.apply(id);
                        this.setWithLogicalExpire(key, newR, time, unit);
                    } catch (Exception e) {
                        throw new RuntimeException(e);
                    }finally {
                        unlock(lockKey);
                    }
                });
            }
            return r;
        }
    
        /**
         * 取数据(互斥锁防止缓存击穿)
         * @param keyPrefix
         * @param id
         * @param type
         * @param dbFallback
         * @param time
         * @param unit
         * @param 
         * @param 
         * @return
         */
        public <R, ID> R getWithMutex(
                String keyPrefix,
                ID id,
                Class<R> type,
                Function<ID, R> dbFallback,
                Long time,
                TimeUnit unit
        ) {
            String key = keyPrefix + id;
            String shopJson = stringRedisTemplate.opsForValue().get(key);
            if (StrUtil.isNotBlank(shopJson)) {
                return JSONUtil.toBean(shopJson, type);
            }
            if (shopJson != null) {
                return null;
            }
    
            // 实现缓存重建,获取互斥锁
            String lockKey = LOCK_APP_KEY + id;
            R r = null;
            try {
                boolean isLock = tryLock(lockKey);
                if (!isLock) {
                    // 获取锁失败,休眠并重试
                    Thread.sleep(50);
                    return getWithMutex(keyPrefix, id, type, dbFallback, time, unit);
                }
                // 获取锁成功,根据id查询数据库
                r = dbFallback.apply(id);
                if (r == null) {
                    // 将空值写入redis
                    stringRedisTemplate.opsForValue().set(key, "", CACHE_NULL_TTL, TimeUnit.MINUTES);
                    return null;
                }
                // 存在则写入redis
                this.setString(key, r, time, unit);
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }finally {
                unlock(lockKey);
            }
            return r;
        }
    
        private boolean tryLock(String key) {
            Boolean flag = stringRedisTemplate.opsForValue().setIfAbsent(key, "1", 10, TimeUnit.SECONDS);
            return BooleanUtil.isTrue(flag);
        }
    
        private void unlock(String key) {
            stringRedisTemplate.delete(key);
        }
    }
    
    
    • 1
    • 2
    • 3
    • 4
    • 5
    • 6
    • 7
    • 8
    • 9
    • 10
    • 11
    • 12
    • 13
    • 14
    • 15
    • 16
    • 17
    • 18
    • 19
    • 20
    • 21
    • 22
    • 23
    • 24
    • 25
    • 26
    • 27
    • 28
    • 29
    • 30
    • 31
    • 32
    • 33
    • 34
    • 35
    • 36
    • 37
    • 38
    • 39
    • 40
    • 41
    • 42
    • 43
    • 44
    • 45
    • 46
    • 47
    • 48
    • 49
    • 50
    • 51
    • 52
    • 53
    • 54
    • 55
    • 56
    • 57
    • 58
    • 59
    • 60
    • 61
    • 62
    • 63
    • 64
    • 65
    • 66
    • 67
    • 68
    • 69
    • 70
    • 71
    • 72
    • 73
    • 74
    • 75
    • 76
    • 77
    • 78
    • 79
    • 80
    • 81
    • 82
    • 83
    • 84
    • 85
    • 86
    • 87
    • 88
    • 89
    • 90
    • 91
    • 92
    • 93
    • 94
    • 95
    • 96
    • 97
    • 98
    • 99
    • 100
    • 101
    • 102
    • 103
    • 104
    • 105
    • 106
    • 107
    • 108
    • 109
    • 110
    • 111
    • 112
    • 113
    • 114
    • 115
    • 116
    • 117
    • 118
    • 119
    • 120
    • 121
    • 122
    • 123
    • 124
    • 125
    • 126
    • 127
    • 128
    • 129
    • 130
    • 131
    • 132
    • 133
    • 134
    • 135
    • 136
    • 137
    • 138
    • 139
    • 140
    • 141
    • 142
    • 143
    • 144
    • 145
    • 146
    • 147
    • 148
    • 149
    • 150
    • 151
    • 152
    • 153
    • 154
    • 155
    • 156
    • 157
    • 158
    • 159
    • 160
    • 161
    • 162
    • 163
    • 164
    • 165
    • 166
    • 167
    • 168
    • 169
    • 170
    • 171
    • 172
    • 173
    • 174
    • 175
    • 176
    • 177
    • 178
    • 179
    • 180
    • 181
    • 182
    • 183
    • 184
    • 185
    • 186
    • 187
    • 188
    • 189
    • 190
    • 191
    • 192
    • 193
    • 194
    • 195
    • 196
    • 197
    • 198
    • 199
    • 200
    • 201
    • 202
    • 203
    • 204
    • 205
    • 206
    • 207
    • 208
    • 209
    • 210
    • 211
    • 212
    • 213
    • 214
    • 215
    • 216
    • 217
    • 218
    • 219
    • 220
    • 221
    • 222
    • 223
    • 224
    • 225
    • 226
    • 227
    • 228
    • 229
    • 230
    • 231
    • 232
    • 233
    • 234
    • 235
    • 236
    • 237
    • 238
    • 239
    • 240
    • 241
    • 242
    • 243
    • 244
    • 245
    • 246
    • 247
    • 248
    • 249
    • 250
    • 251
    • 252
    • 253
    • 254
    • 255
    • 256
    • 257
    • 258
    • 259
    • 260
    • 261
    • 262
    • 263
    • 264
    • 265
    • 266
    • 267
    • 268
    • 269
    • 270
    • 271
    • 272
    • 273
    • 274
    • 275
    • 276
    • 277
    • 278
    • 279
    • 280
    • 281
    • 282
    • 283
    • 284
    • 285
    • 286
    • 287
    • 288
    • 289
    • 290
    • 291
    • 292
    • 293
    • 294
    • 295
    • 296
    • 297
    • 298
    • 299
    • 300
    • 301
    • 302
    • 303
    • 304
    • 305
    • 306
    • 307
    • 308
    • 309
    • 310
    • 311
    • 312
    • 313
    • 314
    • 315
    • 316
    • 317
    • 318
    • 319
    • 320
    • 321
    • 322
    • 323
    • 324
    • 325
    • 326
    • 327
    • 328
    • 329
    • 330
    • 331
    • 332
    • 333
    • 334
    • 335
    • 336
    • 337
    • 338
    • 339
    • 340
    • 341
    • 342
    • 343
    • 344
    • 345
    • 346
    • 347
    • 348
    • 349
    • 350
    • 351
    • 352
    • 353
    • 354
    • 355
    • 356
    • 357
    • 358
    • 359
    • 360
    • 361
    • 362
    • 363
    • 364
    • 365
    • 366
    • 367
    • 368
    • 369
    • 370
    • 371
    • 372
    • 373
    • 374
    • 375
    • 376
    • 377
    • 378
    • 379
    • 380
    • 381
    • 382
    • 383
    • 384
    • 385
    • 386
    • 387
    • 388
    • 389
    • 390
    • 391
    • 392
    • 393
    • 394
    • 395
    • 396
    • 397
    • 398
    • 399
    • 400
    • 401
    • 402
    • 403
    • 404
    • 405
    • 406
    • 407
    • 408
    • 409
    • 410
    • 411
    • 412
    • 413
    • 414
    • 415
    • 416
    • 417
    • 418
    • 419
    • 420
    • 421
    • 422
    • 423
    • 424
    • 425
    • 426
    • 427
    • 428
    • 429
    • 430
    • 431
    • 432
    • 433
    • 434
    • 435
    • 436
    • 437
    • 438
    • 439
    • 440
    • 441
    • 442
    • 443
    • 444
    • 445
    • 446
    • 447
    • 448
    • 449
    • 450
    • 451
    • 452
    • 453
    • 454
    • 455
    • 456
    • 457
    • 458
    • 459
    • 460
    • 461
    • 462
    • 463
    • 464
    • 465
    • 466
    • 467
    • 468
    • 469
    • 470
    • 471
    • 472
    • 473
    • 474
    • 475
    • 476
    • 477
    • 478
    • 479
    • 480
    • 481
    • 482
    • 483
    • 484
    • 485
    • 486
    • 487
    • 488
    • 489
    • 490
    • 491
    • 492
    • 493
    • 494
    • 495
    • 496
    • 497
    • 498
    • 499
    • 500
    • 501
    • 502
    • 503
    • 504
    • 505
    • 506
    • 507
    • 508
    • 509
    • 510
    • 511
    • 512
    • 513
    • 514
    • 515
    • 516
    • 517
    • 518
    • 519
    • 520
    • 521
    • 522
    • 523
    • 524
    • 525
    • 526
    • 527
    • 528
    • 529
    • 530
    • 531
    • 532
    • 533
    • 534
    • 535
    • 536
    • 537
    • 538
    • 539
    • 540
    • 541
    • 542
    • 543
    • 544
    • 545
    • 546
    • 547
    • 548
    • 549
    • 550
    • 551
    • 552
    • 553
    • 554
    • 555
    • 556
    • 557
    • 558
    • 559
    • 560
    • 561
    • 562
    • 563
    • 564
    • 565
    • 566
    • 567
    • 568
    • 569
    • 570
    • 571
    • 572
    • 573
    • 574
    • 575
    • 576
    • 577
    • 578
    • 579
    • 580
    • 581
    • 582
    • 583
    • 584
    • 585
    • 586
    • 587
    • 588
    • 589
    • 590
    • 591
    • 592
    • 593
    • 594
    • 595
    • 596
    • 597
    • 598
    • 599
    • 600
    • 601
    • 602
    • 603
    • 604
    • 605
    • 606
    • 607
    • 608
    • 609
    • 610
    • 611
    • 612
    • 613
    • 614
    • 615
    • 616
    • 617
    • 618
    • 619
    • 620
    • 621
    • 622
    • 623
    • 624
    • 625
    • 626
    • 627
    • 628
    • 629
    • 630
    • 631
    • 632
    • 633
    • 634
    • 635
    • 636
    • 637
    • 638
    • 639
    • 640
    • 641
    • 642
    • 643
    • 644
    • 645
    • 646
    • 647
    • 648
    • 649
    • 650
    • 651
    • 652
    • 653
    • 654
    • 655
    • 656
    • 657
    • 658
    • 659
    • 660
    • 661
    • 662
    • 663
    • 664
    • 665
    • 666
    • 667
    • 668
    • 669
    • 670
    • 671
    • 672
    • 673
    • 674
    • 675
    • 676
    • 677
    • 678
    • 679
    • 680
    • 681
    • 682
    • 683
    • 684
    • 685
    • 686
    • 687
    • 688
    • 689
    • 690
    • 691
    • 692
    • 693
    • 694
    • 695
    • 696
    • 697
    • 698
    • 699
    • 700
    • 701
    • 702
    • 703
    • 704
    • 705
    • 706
    • 707
    • 708
    • 709
    • 710
    • 711
    • 712
    • 713
    • 714
    • 715
    • 716
    • 717
    • 718
    • 719
    • 720
    • 721
    • 722
    • 723
    • 724
    • 725
    • 726
    • 727
    • 728
    • 729
    • 730
    • 731
    • 732
    • 733
    • 734
    • 735
    • 736
    • 737
    • 738
    • 739
    • 740

    如果有兴趣了解更多相关内容,欢迎来我的个人网站看看:瞳孔的个人空间

  • 相关阅读:
    【JavaScript-节点操作】什么是节点,节点操作怎么用,操作节点能干吗?
    JPA自动建表字段名称采用驼峰形式
    OpenCV之直方图均衡化-----(对比度的方法之一)
    C#:Winfrom 实现DataGridView 自定义分页
    Spring Boot+Vue3前后端分离实战wiki知识库系统之前后端交互整合
    Prompt万能框架与常用评估指标
    通过finalshell快速在ubuntu上安装jdk1.8
    Java性能优化的七个方向
    继承的构造函数
    14:00面试,14:06就出来了,问的问题有点变态。。。
  • 原文地址:https://blog.csdn.net/tongkongyu/article/details/125909774