feat: 添加 lettuce-core 用于连接 redis
All checks were successful
Publish Project / build (push) Successful in 2m43s
All checks were successful
Publish Project / build (push) Successful in 2m43s
This commit is contained in:
@@ -14,13 +14,16 @@ dependencies {
|
||||
exclude(module = "adventure-api")
|
||||
exclude(group = "org.jetbrains")
|
||||
}
|
||||
// https://mvnrepository.com/artifact/redis.clients/jedis
|
||||
|
||||
implementation("com.zaxxer:HikariCP:4.0.3") { exclude(group = "org.slf4j") }
|
||||
api("redis.clients:jedis:5.1.4") {
|
||||
exclude(group = "com.google.code.gson")
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
|
||||
implementation("com.zaxxer:HikariCP:4.0.3") { exclude(group = "org.slf4j") }
|
||||
api("io.lettuce:lettuce-core:6.7.1.RELEASE") {
|
||||
exclude(group = "io.netty")
|
||||
exclude(group = "org.slf4j")
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
|
@@ -72,6 +72,7 @@ public class HamsterCorePlugin extends Plugin {
|
||||
long start = System.currentTimeMillis();
|
||||
if (CoreAPI.getInstance().isEnableRedis()) {
|
||||
CoreAPI.getInstance().getJedisPool().close();
|
||||
CoreAPI.getInstance().getRedisClient().close();
|
||||
simpleLogger.info("已关闭 Redis 连接池");
|
||||
}
|
||||
if (CoreAPI.getInstance().isEnableDatabase()) {
|
||||
|
Reference in New Issue
Block a user