mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
docs(sample): Add sample codes. 🥚
This commit is contained in:
@@ -58,12 +58,13 @@ public class Sample {
|
||||
ConfiguredValue<Boolean> ENABLED = ConfiguredValue.of(true);
|
||||
|
||||
interface INFO extends Configuration {
|
||||
|
||||
@HeaderComment("Configure your name!") // Header comment
|
||||
ConfiguredValue<String> NAME = ConfiguredValue.of("Joker");
|
||||
|
||||
ConfiguredValue<Integer> AGE = ConfiguredValue.of(24);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -83,8 +84,7 @@ public class Sample {
|
||||
```yaml
|
||||
# Configurations for sample
|
||||
|
||||
# Enabled?
|
||||
enabled: true
|
||||
enabled: true # Enabled?
|
||||
|
||||
info:
|
||||
# Configure your name!
|
||||
|
||||
+2
-3
@@ -52,12 +52,12 @@ public class Sample {
|
||||
ConfiguredValue<Boolean> ENABLED = ConfiguredValue.of(true);
|
||||
|
||||
interface INFO extends Configuration {
|
||||
|
||||
@HeaderComment("Configure your name!") // 头部注释
|
||||
ConfiguredValue<String> NAME = ConfiguredValue.of("Joker");
|
||||
|
||||
ConfiguredValue<Integer> AGE = ConfiguredValue.of(24);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
@@ -76,8 +76,7 @@ public class Sample {
|
||||
```yaml
|
||||
# Configurations for sample
|
||||
|
||||
# Enabled?
|
||||
enabled: true
|
||||
enabled: true # Enabled?
|
||||
|
||||
info:
|
||||
# Configure your name!
|
||||
|
||||
Reference in New Issue
Block a user