feat: 将 lettuce 改为 jedis

This commit is contained in:
2024-03-13 17:10:41 +08:00
parent ffc2ecc2ee
commit f6233f7e82
8 changed files with 28 additions and 28 deletions

View File

@@ -20,8 +20,11 @@ dependencies {
implementation("com.zaxxer:HikariCP:4.0.3") {
exclude(group = "org.slf4j")
}
// https://mvnrepository.com/artifact/io.lettuce/lettuce-core
implementation("io.lettuce:lettuce-core:6.3.1.RELEASE")
// https://mvnrepository.com/artifact/redis.clients/jedis
implementation("redis.clients:jedis:5.1.2") {
exclude(group = "com.google.code.gson")
exclude(group = "org.slf4j")
}
// https://mvnrepository.com/artifact/org.quartz-scheduler/quartz
implementation("org.quartz-scheduler:quartz:2.3.2") {
isTransitive = false

View File

@@ -62,7 +62,7 @@ public class HamsterCorePlugin extends Plugin {
public void onDisable() {
long start = System.currentTimeMillis();
Logger logger = getLogger();
CoreAPI.getInstance().getRedisClient().close();
CoreAPI.getInstance().getJedisPool().close();
logger.info("已关闭 Redis 连接池");
CoreAPI.getInstance().getHikariDataSource().close();
logger.info("已关闭数据库连接池");