perf: 简化代码
This commit is contained in:
@@ -71,7 +71,7 @@ public class HamsterCorePlugin {
|
||||
slf4jLogger.error("初始化 CoreAPI 出错", e);
|
||||
}
|
||||
long time = System.currentTimeMillis() - start;
|
||||
slf4jLogger.info("HamsterCore 初始化完成,总计耗时 " + time + " ms");
|
||||
slf4jLogger.info("仓鼠核心初始化完成,总计耗时 " + time + " ms");
|
||||
}
|
||||
|
||||
@Subscribe(order = PostOrder.FIRST)
|
||||
@@ -120,6 +120,6 @@ public class HamsterCorePlugin {
|
||||
CoreAPI.getInstance().getScheduledService().shutdownNow();
|
||||
slf4jLogger.info("已关闭 ScheduledExecutorService 线程池");
|
||||
long time = System.currentTimeMillis() - start;
|
||||
slf4jLogger.info("HamsterCore 关闭完成,总计耗时 " + time + " ms");
|
||||
slf4jLogger.info("仓鼠核心关闭完成,总计耗时 " + time + " ms");
|
||||
}
|
||||
}
|
@@ -10,16 +10,10 @@ redis-url: "redis://localhost:6379/0?clientName=HamsterCore&timeout=5s"
|
||||
|
||||
datasource:
|
||||
# 数据库链接驱动地址
|
||||
# 除非你知道自己在做什么,否则不建议更改该项
|
||||
# 旧版服务端(低于1.13)请使用:com.mysql.jdbc.Driver
|
||||
driver: "com.mysql.cj.jdbc.Driver"
|
||||
# 数据库链接填写格式:
|
||||
# MySQL数据库链接填写格式:
|
||||
# jdbc:mysql://{数据库地址}:{数据库端口}/{使用的库名}?参数
|
||||
# 除非你知道自己在做什么,否则不建议随意更改参数
|
||||
url: "jdbc:mysql://localhost:3306/Test?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true"
|
||||
# 如果你不需要做多端跨服,那么请使用 sqlite 作本地数据库
|
||||
# driver: "org.sqlite.JDBC"
|
||||
# url: "jdbc:sqlite:./plugins/HamsterCore/database.db"
|
||||
# 用户名
|
||||
username: "root"
|
||||
# 密码
|
||||
@@ -28,8 +22,8 @@ datasource:
|
||||
# 推荐值:1~3
|
||||
minimum-idle: 0
|
||||
# 最大链接数
|
||||
# 推荐值:不低于3
|
||||
maximum-pool-size: 3
|
||||
# 推荐值:不低于5
|
||||
maximum-pool-size: 5
|
||||
# 保持连接池可用的间隔
|
||||
# 除非你的服务器数据库连接经常断开,否则不建议启用该选项
|
||||
# 单位:毫秒
|
||||
|
Reference in New Issue
Block a user