有些场景,需要使用Redis的ZSET数据结构。一方面是持久化存储数据,另一方面还需要排序分页获取。
本文写了一个Redis的ZSET使用的工具类,包含ZSET常见的操作,如:add、remove、range等。
实际使用中,配置好redis的自动注入,直接copy这个组件component,注入使用。
RedisSetHelper
1 | import lombok.extern.slf4j.Slf4j; |
有些场景,需要使用Redis的ZSET数据结构。一方面是持久化存储数据,另一方面还需要排序分页获取。
本文写了一个Redis的ZSET使用的工具类,包含ZSET常见的操作,如:add、remove、range等。
实际使用中,配置好redis的自动注入,直接copy这个组件component,注入使用。
1 | import lombok.extern.slf4j.Slf4j; |
tag:
缺失模块。
1、请确保node版本大于6.2
2、在博客根目录(注意不是yilia根目录)执行以下命令:
npm i hexo-generator-json-content --save
3、在根目录_config.yml里添加配置:
jsonContent:
meta: false
pages: false
posts:
title: true
date: true
path: true
text: false
raw: false
content: false
slug: false
updated: false
comments: false
link: false
permalink: false
excerpt: false
categories: false
tags: true