1
mirror of https://github.com/CarmJos/EasyConfiguration.git synced 2026-06-05 11:54:13 +08:00

[2.3.0] 版本更新

- [U] 基于 tchristofferson/ConfigUpdater 项目重写YAML相关配置文件的注释部分。
- [A] 为 @ConfigComment 注解添加 ”statWrap“ 与 "endWrap" 两个选项,用于实现不同样式的注释。
This commit is contained in:
2022-04-23 20:35:48 +08:00
parent 760ac815df
commit 390815b790
30 changed files with 358 additions and 120 deletions
@@ -10,22 +10,26 @@ import cc.carm.lib.configuration.core.value.type.ConfiguredValue;
public class DatabaseConfiguration extends ConfigurationRoot {
@ConfigPath("driver")
@ConfigComment({
@ConfigComment(value = {
"数据库驱动配置,请根据数据库类型设置。",
"- MySQL: com.mysql.cj.jdbc.Driver",
"- MariaDB(推荐): org.mariadb.jdbc.Driver",
})
}, startWrap = false)
protected static final ConfigValue<String> DRIVER_NAME = ConfiguredValue.of(
String.class, "com.mysql.cj.jdbc.Driver"
);
@ConfigComment(startWrap = false)
protected static final ConfigValue<String> HOST = ConfiguredValue.of(String.class, "127.0.0.1");
@ConfigComment(startWrap = false)
protected static final ConfigValue<Integer> PORT = ConfiguredValue.of(Integer.class, 3306);
@ConfigComment(startWrap = false)
protected static final ConfigValue<String> DATABASE = ConfiguredValue.of(String.class, "minecraft");
@ConfigComment(startWrap = false)
protected static final ConfigValue<String> USERNAME = ConfiguredValue.of(String.class, "root");
@ConfigComment(startWrap = false)
protected static final ConfigValue<String> PASSWORD = ConfiguredValue.of(String.class, "password");
@ConfigComment(startWrap = false)
protected static final ConfigValue<String> EXTRA = ConfiguredValue.of(String.class, "?useSSL=false");
protected static String buildJDBC() {