feat: 将 lettuce 改为 jedis
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
@file:Suppress("VulnerableLibrariesLocal")
|
||||
|
||||
evaluationDependsOn(":core-common")
|
||||
|
||||
dependencies {
|
||||
implementation(project(":core-common")) {
|
||||
isTransitive = false
|
||||
}
|
||||
compileOnly("org.spigotmc:spigot-api:1.20.4-R0.1-SNAPSHOT")
|
||||
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
|
||||
|
||||
implementation("de.tr7zw:item-nbt-api:2.12.3-SNAPSHOT")
|
||||
compileOnly("net.milkbowl.vault:VaultAPI:1.7") {
|
||||
@@ -28,8 +30,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
|
||||
|
@@ -109,7 +109,7 @@ public class HamsterCorePlugin extends JavaPlugin {
|
||||
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("已关闭数据库连接池");
|
||||
|
@@ -6,7 +6,6 @@
|
||||
# 若没有设置 redis 用户名,也没有设置密码,则可以使用以下格式:
|
||||
# redis://localhost:6379/0?clientName=HamsterCore
|
||||
# 若不设置数据库,则默认使用 0
|
||||
# 详细信息:https://github.com/lettuce-io/lettuce-core/wiki/Redis-URI-and-connection-details
|
||||
redis-url: "redis://localhost:6379/0?clientName=HamsterCore&timeout=5s"
|
||||
|
||||
datasource:
|
||||
|
Reference in New Issue
Block a user