mirror of
https://github.com/LamGC/ScalaBot.git
synced 2025-04-30 06:37:29 +00:00
fix(config): 修复因使用了错误的 Gson 对象而导致的配置初始化警告.
导致的原因是在初始化 app.json 时错误的使用了 botConfigGson, 而 botConfigGson 未配置用于 MetricsServer 的 UsernameAuthenticator 序列化器, 导致在初始化配置文件中序列化 AppConfig 时, Gson 会反射调用 BasicAuthenticator, 导致被 Java 模块系统拦截并报错, 现已修复该问题.
This commit is contained in:
parent
27dc26160d
commit
9b7fc30512
@ -114,7 +114,7 @@ internal enum class AppPaths(
|
|||||||
CONFIG_APPLICATION({ "$DATA_ROOT/config.json" }, {
|
CONFIG_APPLICATION({ "$DATA_ROOT/config.json" }, {
|
||||||
if (!file.exists()) {
|
if (!file.exists()) {
|
||||||
file.bufferedWriter(StandardCharsets.UTF_8).use {
|
file.bufferedWriter(StandardCharsets.UTF_8).use {
|
||||||
GsonConst.botConfigGson.toJson(
|
GsonConst.appConfigGson.toJson(
|
||||||
AppConfig(
|
AppConfig(
|
||||||
mavenRepositories = listOf(
|
mavenRepositories = listOf(
|
||||||
MavenRepositoryConfig(
|
MavenRepositoryConfig(
|
||||||
|
Loading…
Reference in New Issue
Block a user