mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-05 02:58:20 +08:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0fddfe28af | |||
| 4a17089da0 | |||
| 8faa7b1c24 | |||
| 5e525428fe | |||
| bc0dfd5698 | |||
| dc28d743db | |||
| f61294c5f3 | |||
| 6883a464db | |||
| bcdf0d9bd1 | |||
| 5f89ff4db7 | |||
| d6f4970277 | |||
| c045ca1489 | |||
| ceea900b08 |
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easyconfiguration-parent</artifactId>
|
<artifactId>easyconfiguration-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>3.0.0</version>
|
<version>3.2.0</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
+1
-1
@@ -19,7 +19,7 @@ public class ConfigValueBuilder<V> {
|
|||||||
return fromSection(ConfigValueParser.required(), ConfigDataFunction.required());
|
return fromSection(ConfigValueParser.required(), ConfigDataFunction.required());
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull SectionValueBuilder<V> fromSection(@NotNull ConfigValueParser<ConfigurationWrapper, V> valueParser,
|
public @NotNull SectionValueBuilder<V> fromSection(@NotNull ConfigValueParser<ConfigurationWrapper<?>, V> valueParser,
|
||||||
@NotNull ConfigDataFunction<V, ? extends Map<String, Object>> valueSerializer) {
|
@NotNull ConfigDataFunction<V, ? extends Map<String, Object>> valueSerializer) {
|
||||||
return new SectionValueBuilder<>(this.valueClass, valueParser, valueSerializer);
|
return new SectionValueBuilder<>(this.valueClass, valueParser, valueSerializer);
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -15,11 +15,11 @@ public class SectionValueBuilder<V>
|
|||||||
|
|
||||||
protected final @NotNull Class<V> valueClass;
|
protected final @NotNull Class<V> valueClass;
|
||||||
|
|
||||||
protected @NotNull ConfigValueParser<ConfigurationWrapper, V> parser;
|
protected @NotNull ConfigValueParser<ConfigurationWrapper<?>, V> parser;
|
||||||
protected @NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer;
|
protected @NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer;
|
||||||
|
|
||||||
public SectionValueBuilder(@NotNull Class<V> valueClass,
|
public SectionValueBuilder(@NotNull Class<V> valueClass,
|
||||||
@NotNull ConfigValueParser<ConfigurationWrapper, V> parser,
|
@NotNull ConfigValueParser<ConfigurationWrapper<?>, V> parser,
|
||||||
@NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer) {
|
@NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer) {
|
||||||
this.valueClass = valueClass;
|
this.valueClass = valueClass;
|
||||||
this.parser = parser;
|
this.parser = parser;
|
||||||
@@ -32,7 +32,7 @@ public class SectionValueBuilder<V>
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull SectionValueBuilder<V> parseValue(ConfigValueParser<ConfigurationWrapper, V> valueParser) {
|
public @NotNull SectionValueBuilder<V> parseValue(ConfigValueParser<ConfigurationWrapper<?>, V> valueParser) {
|
||||||
this.parser = valueParser;
|
this.parser = valueParser;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,51 @@
|
|||||||
|
package cc.carm.lib.configuration.core.source;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
import org.jetbrains.annotations.Unmodifiable;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
|
public abstract class ConfigurationComments {
|
||||||
|
|
||||||
|
protected final @NotNull Map<String, List<String>> headerComments = new HashMap<>();
|
||||||
|
protected final @NotNull Map<String, String> inlineComments = new HashMap<>();
|
||||||
|
|
||||||
|
protected @NotNull Map<String, List<String>> getHeaderComments() {
|
||||||
|
return headerComments;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected @NotNull Map<String, String> getInlineComments() {
|
||||||
|
return inlineComments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setHeaderComments(@Nullable String path, @Nullable List<String> comments) {
|
||||||
|
|
||||||
|
if (comments == null) {
|
||||||
|
getHeaderComments().remove(path);
|
||||||
|
} else {
|
||||||
|
getHeaderComments().put(path, comments);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void setInlineComment(@NotNull String path, @Nullable String comment) {
|
||||||
|
if (comment == null) {
|
||||||
|
getInlineComments().remove(path);
|
||||||
|
} else {
|
||||||
|
getInlineComments().put(path, comment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nullable
|
||||||
|
@Unmodifiable
|
||||||
|
public List<String> getHeaderComment(@Nullable String path) {
|
||||||
|
return Optional.ofNullable(getHeaderComments().get(path)).map(Collections::unmodifiableList).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public @Nullable String getInlineComment(@NotNull String path) {
|
||||||
|
return getInlineComments().get(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+25
-7
@@ -7,8 +7,9 @@ import org.jetbrains.annotations.Nullable;
|
|||||||
import org.jetbrains.annotations.Unmodifiable;
|
import org.jetbrains.annotations.Unmodifiable;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
public abstract class ConfigurationProvider<W extends ConfigurationWrapper> {
|
public abstract class ConfigurationProvider<W extends ConfigurationWrapper<?>> {
|
||||||
|
|
||||||
protected long updateTime;
|
protected long updateTime;
|
||||||
|
|
||||||
@@ -21,24 +22,41 @@ public abstract class ConfigurationProvider<W extends ConfigurationWrapper> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isExpired(long time) {
|
public boolean isExpired(long time) {
|
||||||
return this.updateTime > time;
|
return getUpdateTime() > time;
|
||||||
}
|
}
|
||||||
|
|
||||||
public abstract @NotNull W getConfiguration();
|
public abstract @NotNull W getConfiguration();
|
||||||
|
|
||||||
public abstract void reload() throws Exception;
|
public void reload() throws Exception {
|
||||||
|
onReload(); // 调用重写的Reload方法
|
||||||
|
this.updateTime = System.currentTimeMillis();
|
||||||
|
}
|
||||||
|
|
||||||
public abstract void save() throws Exception;
|
public abstract void save() throws Exception;
|
||||||
|
|
||||||
public abstract void setHeaderComment(@Nullable String path, @Nullable List<String> comments);
|
protected abstract void onReload() throws Exception;
|
||||||
|
|
||||||
public abstract void setInlineComment(@NotNull String path, @Nullable String comment);
|
public abstract @Nullable ConfigurationComments getComments();
|
||||||
|
|
||||||
|
public void setHeaderComment(@Nullable String path, @Nullable List<String> comments) {
|
||||||
|
if (getComments() == null) return;
|
||||||
|
getComments().setHeaderComments(path, comments);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setInlineComment(@NotNull String path, @Nullable String comment) {
|
||||||
|
if (getComments() == null) return;
|
||||||
|
getComments().setInlineComment(path, comment);
|
||||||
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Unmodifiable
|
@Unmodifiable
|
||||||
public abstract List<String> getHeaderComment(@Nullable String path);
|
public List<String> getHeaderComment(@Nullable String path) {
|
||||||
|
return Optional.ofNullable(getComments()).map(c -> c.getHeaderComment(path)).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
public abstract @Nullable String getInlineComment(@NotNull String path);
|
public @Nullable String getInlineComment(@NotNull String path) {
|
||||||
|
return Optional.ofNullable(getComments()).map(c -> c.getInlineComment(path)).orElse(null);
|
||||||
|
}
|
||||||
|
|
||||||
public abstract @NotNull ConfigInitializer<? extends ConfigurationProvider<W>> getInitializer();
|
public abstract @NotNull ConfigInitializer<? extends ConfigurationProvider<W>> getInitializer();
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
|
|
||||||
interface ConfigurationReader {
|
interface ConfigurationReader {
|
||||||
|
|
||||||
ConfigurationWrapper getWrapper();
|
ConfigurationWrapper<?> getWrapper();
|
||||||
|
|
||||||
default boolean isBoolean(@NotNull String path) {
|
default boolean isBoolean(@NotNull String path) {
|
||||||
return getWrapper().isType(path, Boolean.class);
|
return getWrapper().isType(path, Boolean.class);
|
||||||
|
|||||||
@@ -9,13 +9,15 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public interface ConfigurationWrapper extends ConfigurationReader {
|
public interface ConfigurationWrapper<S> extends ConfigurationReader {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default ConfigurationWrapper getWrapper() {
|
default ConfigurationWrapper<S> getWrapper() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@NotNull S getSource();
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
Set<String> getKeys(boolean deep);
|
Set<String> getKeys(boolean deep);
|
||||||
|
|
||||||
@@ -66,6 +68,6 @@ public interface ConfigurationWrapper extends ConfigurationReader {
|
|||||||
boolean isConfigurationSection(@NotNull String path);
|
boolean isConfigurationSection(@NotNull String path);
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
ConfigurationWrapper getConfigurationSection(@NotNull String path);
|
ConfigurationWrapper<S> getConfigurationSection(@NotNull String path);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ import java.net.URL;
|
|||||||
import java.net.URLConnection;
|
import java.net.URLConnection;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
public abstract class FileConfigProvider<W extends ConfigurationWrapper> extends ConfigurationProvider<W> {
|
public abstract class FileConfigProvider<W extends ConfigurationWrapper<?>> extends ConfigurationProvider<W> {
|
||||||
|
|
||||||
protected final @NotNull File file;
|
protected final @NotNull File file;
|
||||||
|
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ public abstract class ConfigValue<T> {
|
|||||||
.orElseThrow(() -> new IllegalStateException("Value(" + configPath + ") does not have a provider."));
|
.orElseThrow(() -> new IllegalStateException("Value(" + configPath + ") does not have a provider."));
|
||||||
}
|
}
|
||||||
|
|
||||||
public final @NotNull ConfigurationWrapper getConfiguration() {
|
public final @NotNull ConfigurationWrapper<?> getConfiguration() {
|
||||||
try {
|
try {
|
||||||
return getProvider().getConfiguration();
|
return getProvider().getConfiguration();
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ public class ConfiguredMap<K, V> extends CachedConfigValue<Map<K, V>> {
|
|||||||
if (isExpired()) { // 已过时的数据,需要重新解析一次。
|
if (isExpired()) { // 已过时的数据,需要重新解析一次。
|
||||||
Map<K, V> map = supplier.get();
|
Map<K, V> map = supplier.get();
|
||||||
|
|
||||||
ConfigurationWrapper section = getConfiguration().getConfigurationSection(getConfigPath());
|
ConfigurationWrapper<?> section = getConfiguration().getConfigurationSection(getConfigPath());
|
||||||
if (section == null) return useOrDefault(map);
|
if (section == null) return useOrDefault(map);
|
||||||
|
|
||||||
Set<String> keys = section.getKeys(false);
|
Set<String> keys = section.getKeys(false);
|
||||||
|
|||||||
@@ -21,13 +21,13 @@ public class ConfiguredSection<V> extends CachedConfigValue<V> {
|
|||||||
|
|
||||||
protected final @NotNull Class<V> valueClass;
|
protected final @NotNull Class<V> valueClass;
|
||||||
|
|
||||||
protected final @NotNull ConfigValueParser<ConfigurationWrapper, V> parser;
|
protected final @NotNull ConfigValueParser<ConfigurationWrapper<?>, V> parser;
|
||||||
protected final @NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer;
|
protected final @NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer;
|
||||||
|
|
||||||
public ConfiguredSection(@Nullable ConfigurationProvider<?> provider, @Nullable String sectionPath,
|
public ConfiguredSection(@Nullable ConfigurationProvider<?> provider, @Nullable String sectionPath,
|
||||||
@Nullable List<String> headerComments, @Nullable String inlineComments,
|
@Nullable List<String> headerComments, @Nullable String inlineComments,
|
||||||
@NotNull Class<V> valueClass, @Nullable V defaultValue,
|
@NotNull Class<V> valueClass, @Nullable V defaultValue,
|
||||||
@NotNull ConfigValueParser<ConfigurationWrapper, V> parser,
|
@NotNull ConfigValueParser<ConfigurationWrapper<?>, V> parser,
|
||||||
@NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer) {
|
@NotNull ConfigDataFunction<V, ? extends Map<String, Object>> serializer) {
|
||||||
super(provider, sectionPath, headerComments, inlineComments, defaultValue);
|
super(provider, sectionPath, headerComments, inlineComments, defaultValue);
|
||||||
this.valueClass = valueClass;
|
this.valueClass = valueClass;
|
||||||
@@ -39,7 +39,7 @@ public class ConfiguredSection<V> extends CachedConfigValue<V> {
|
|||||||
return valueClass;
|
return valueClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
public @NotNull ConfigValueParser<ConfigurationWrapper, V> getParser() {
|
public @NotNull ConfigValueParser<ConfigurationWrapper<?>, V> getParser() {
|
||||||
return parser;
|
return parser;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -50,7 +50,7 @@ public class ConfiguredSection<V> extends CachedConfigValue<V> {
|
|||||||
@Override
|
@Override
|
||||||
public @Nullable V get() {
|
public @Nullable V get() {
|
||||||
if (isExpired()) { // 已过时的数据,需要重新解析一次。
|
if (isExpired()) { // 已过时的数据,需要重新解析一次。
|
||||||
ConfigurationWrapper section = getConfiguration().getConfigurationSection(getConfigPath());
|
ConfigurationWrapper<?> section = getConfiguration().getConfigurationSection(getConfigPath());
|
||||||
if (section == null) return useDefault();
|
if (section == null) return useDefault();
|
||||||
try {
|
try {
|
||||||
// 若未出现错误,则直接更新缓存并返回。
|
// 若未出现错误,则直接更新缓存并返回。
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easyconfiguration-parent</artifactId>
|
<artifactId>easyconfiguration-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>3.0.0</version>
|
<version>3.2.0</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.9.0</version>
|
<version>2.9.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package cc.carm.lib.configuration.json;
|
package cc.carm.lib.configuration.json;
|
||||||
|
|
||||||
import cc.carm.lib.configuration.core.ConfigInitializer;
|
import cc.carm.lib.configuration.core.ConfigInitializer;
|
||||||
|
import cc.carm.lib.configuration.core.source.ConfigurationComments;
|
||||||
import cc.carm.lib.configuration.core.source.ConfigurationProvider;
|
import cc.carm.lib.configuration.core.source.ConfigurationProvider;
|
||||||
import cc.carm.lib.configuration.core.source.impl.FileConfigProvider;
|
import cc.carm.lib.configuration.core.source.impl.FileConfigProvider;
|
||||||
import com.google.gson.Gson;
|
import com.google.gson.Gson;
|
||||||
@@ -8,12 +9,10 @@ import com.google.gson.GsonBuilder;
|
|||||||
import com.google.gson.JsonSerializer;
|
import com.google.gson.JsonSerializer;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.annotations.Unmodifiable;
|
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.LinkedHashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Some code comes from BungeeCord's implementation of the JsonConfiguration.
|
* Some code comes from BungeeCord's implementation of the JsonConfiguration.
|
||||||
@@ -49,7 +48,6 @@ public class JSONConfigProvider extends FileConfigProvider<JSONConfigWrapper> {
|
|||||||
if (map == null) map = new LinkedHashMap<>();
|
if (map == null) map = new LinkedHashMap<>();
|
||||||
|
|
||||||
this.configuration = new JSONConfigWrapper(map);
|
this.configuration = new JSONConfigWrapper(map);
|
||||||
this.initializer = new ConfigInitializer<>(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -58,10 +56,16 @@ public class JSONConfigProvider extends FileConfigProvider<JSONConfigWrapper> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reload() {
|
protected void onReload() throws Exception {
|
||||||
|
super.reload();
|
||||||
initializeConfig();
|
initializeConfig();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable ConfigurationComments getComments() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void save() throws Exception {
|
public void save() throws Exception {
|
||||||
try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {
|
try (Writer writer = new OutputStreamWriter(new FileOutputStream(file), StandardCharsets.UTF_8)) {
|
||||||
@@ -69,26 +73,6 @@ public class JSONConfigProvider extends FileConfigProvider<JSONConfigWrapper> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setHeaderComment(@Nullable String path, @Nullable List<String> comments) {
|
|
||||||
// JSON doesn't support comments;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setInlineComment(@NotNull String path, @Nullable String comment) {
|
|
||||||
// JSON doesn't support comments;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable @Unmodifiable List<String> getHeaderComment(@Nullable String path) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable String getInlineComment(@NotNull String path) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull ConfigInitializer<? extends ConfigurationProvider<JSONConfigWrapper>> getInitializer() {
|
public @NotNull ConfigInitializer<? extends ConfigurationProvider<JSONConfigWrapper>> getInitializer() {
|
||||||
return this.initializer;
|
return this.initializer;
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import java.util.Set;
|
|||||||
*
|
*
|
||||||
* @author md_5, CarmJos
|
* @author md_5, CarmJos
|
||||||
*/
|
*/
|
||||||
public class JSONConfigWrapper implements ConfigurationWrapper {
|
public class JSONConfigWrapper implements ConfigurationWrapper<Map<String, Object>> {
|
||||||
|
|
||||||
private static final char SEPARATOR = '.';
|
private static final char SEPARATOR = '.';
|
||||||
protected final Map<String, Object> data;
|
protected final Map<String, Object> data;
|
||||||
@@ -33,6 +33,10 @@ public class JSONConfigWrapper implements ConfigurationWrapper {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull Map<String, Object> getSource() {
|
||||||
|
return this.data;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull Set<String> getKeys(boolean deep) {
|
public @NotNull Set<String> getKeys(boolean deep) {
|
||||||
@@ -94,7 +98,7 @@ public class JSONConfigWrapper implements ConfigurationWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable ConfigurationWrapper getConfigurationSection(@NotNull String path) {
|
public @Nullable JSONConfigWrapper getConfigurationSection(@NotNull String path) {
|
||||||
Object val = get(path);
|
Object val = get(path);
|
||||||
return (val instanceof JSONConfigWrapper) ? (JSONConfigWrapper) val : null;
|
return (val instanceof JSONConfigWrapper) ? (JSONConfigWrapper) val : null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class SomeModel extends AbstractModel {
|
public class SomeModel extends AbstractModel {
|
||||||
|
|
||||||
int num;
|
public final int num;
|
||||||
|
|
||||||
public SomeModel(@NotNull String name, int num) {
|
public SomeModel(@NotNull String name, int num) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ public class TestModel extends AbstractModel {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TestModel deserialize(ConfigurationWrapper section) {
|
public static TestModel deserialize(ConfigurationWrapper<?> section) {
|
||||||
String name = section.getString("name");
|
String name = section.getString("name");
|
||||||
if (name == null) throw new NullPointerException("name is null");
|
if (name == null) throw new NullPointerException("name is null");
|
||||||
String uuidString = section.getString("info.uuid");
|
String uuidString = section.getString("info.uuid");
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
|
<parent>
|
||||||
|
<artifactId>easyconfiguration-parent</artifactId>
|
||||||
|
<groupId>cc.carm.lib</groupId>
|
||||||
|
<version>3.2.0</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>${java.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${java.version}</maven.compiler.target>
|
||||||
|
</properties>
|
||||||
|
<artifactId>easyconfiguration-sql</artifactId>
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>${project.parent.groupId}</groupId>
|
||||||
|
<artifactId>easyconfiguration-core</artifactId>
|
||||||
|
<version>${project.parent.version}</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
package cc.carm.lib.configuration;
|
||||||
|
|
||||||
|
public class EasyConfiguration {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
package cc.carm.lib.configuration.sql;
|
||||||
|
|
||||||
|
import cc.carm.lib.configuration.core.ConfigInitializer;
|
||||||
|
import cc.carm.lib.configuration.core.source.ConfigurationComments;
|
||||||
|
import cc.carm.lib.configuration.core.source.ConfigurationProvider;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
public class SQLConfigProvider extends ConfigurationProvider<SQLSectionWrapper> {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull SQLSectionWrapper getConfiguration() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void save() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onReload() throws Exception {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable ConfigurationComments getComments() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull ConfigInitializer<? extends ConfigurationProvider<SQLSectionWrapper>> getInitializer() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package cc.carm.lib.configuration.sql;
|
||||||
|
|
||||||
|
import cc.carm.lib.configuration.core.source.ConfigurationWrapper;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
public class SQLSectionWrapper implements ConfigurationWrapper<Map<String, Object>> {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull Map<String, Object> getSource() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull Set<String> getKeys(boolean deep) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull Map<String, Object> getValues(boolean deep) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void set(@NotNull String path, @Nullable Object value) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean contains(@NotNull String path) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable Object get(@NotNull String path) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isList(@NotNull String path) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable List<?> getList(@NotNull String path) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isConfigurationSection(@NotNull String path) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @Nullable SQLSectionWrapper getConfigurationSection(@NotNull String path) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
package cc.carm.lib.configuration.sql;
|
||||||
|
|
||||||
|
public class SQLValueParser {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
CREATE TABLE IF NOT EXISTS conf
|
||||||
|
(
|
||||||
|
`namespace` VARCHAR(255) NOT NULL, # 命名空间
|
||||||
|
`section` VARCHAR(255) NOT NULL, # 配置路径 (ConfigPath)
|
||||||
|
`type` VARCHAR(255) NOT NULL, # 数据类型 (Integer/Byte/List/Map/...)
|
||||||
|
`value` MEDIUMTEXT, # 配置项的值 (可能为JSON格式)
|
||||||
|
`inline_comments` TINYTEXT, # 行内注释
|
||||||
|
`header_comments` TEXT, # 顶部注释
|
||||||
|
`created_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||||
|
`updated_at` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||||
|
PRIMARY KEY (`namespace`, `section`)
|
||||||
|
) ENGINE = InnoDB
|
||||||
|
DEFAULT CHARSET = utf8mb4;
|
||||||
|
|
||||||
+2
-2
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>easyconfiguration-parent</artifactId>
|
<artifactId>easyconfiguration-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>3.0.0</version>
|
<version>3.2.0</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.bspfsystems</groupId>
|
<groupId>org.bspfsystems</groupId>
|
||||||
<artifactId>yamlconfiguration</artifactId>
|
<artifactId>yamlconfiguration</artifactId>
|
||||||
<version>1.1.0</version>
|
<version>1.2.1</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -1,60 +1,23 @@
|
|||||||
package cc.carm.lib.configuration.yaml;
|
package cc.carm.lib.configuration.yaml;
|
||||||
|
|
||||||
|
import cc.carm.lib.configuration.core.source.ConfigurationComments;
|
||||||
import org.bspfsystems.yamlconfiguration.configuration.ConfigurationSection;
|
import org.bspfsystems.yamlconfiguration.configuration.ConfigurationSection;
|
||||||
import org.bspfsystems.yamlconfiguration.file.FileConfiguration;
|
import org.bspfsystems.yamlconfiguration.file.FileConfiguration;
|
||||||
import org.bspfsystems.yamlconfiguration.file.YamlConfiguration;
|
import org.bspfsystems.yamlconfiguration.file.YamlConfiguration;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.annotations.Unmodifiable;
|
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.*;
|
import java.util.List;
|
||||||
|
import java.util.StringJoiner;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
import static cc.carm.lib.configuration.yaml.YAMLConfigProvider.SEPARATOR;
|
import static cc.carm.lib.configuration.yaml.YAMLConfigProvider.SEPARATOR;
|
||||||
|
|
||||||
public class YAMLComments {
|
@SuppressWarnings("SpellCheckingInspection")
|
||||||
|
public class YAMLComments extends ConfigurationComments {
|
||||||
protected final @NotNull Map<String, List<String>> headerComments = new HashMap<>();
|
|
||||||
protected final @NotNull Map<String, String> inlineComments = new HashMap<>();
|
|
||||||
|
|
||||||
protected @NotNull Map<String, List<String>> getHeaderComments() {
|
|
||||||
return headerComments;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected @NotNull Map<String, String> getInlineComments() {
|
|
||||||
return inlineComments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setHeaderComments(@Nullable String path, @Nullable List<String> comments) {
|
|
||||||
|
|
||||||
if (comments == null) {
|
|
||||||
getHeaderComments().remove(path);
|
|
||||||
} else {
|
|
||||||
getHeaderComments().put(path, comments);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void setInlineComment(@NotNull String path, @Nullable String comment) {
|
|
||||||
if (comment == null) {
|
|
||||||
getInlineComments().remove(path);
|
|
||||||
} else {
|
|
||||||
getInlineComments().put(path, comment);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
|
||||||
@Unmodifiable
|
|
||||||
public List<String> getHeaderComment(@Nullable String path) {
|
|
||||||
return Optional.ofNullable(getHeaderComments().get(path)).map(Collections::unmodifiableList).orElse(null);
|
|
||||||
}
|
|
||||||
|
|
||||||
public @Nullable String getInlineComment(@NotNull String path) {
|
|
||||||
return getInlineComments().get(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
public @Nullable String buildHeaderComments(@Nullable String path, @NotNull String indents) {
|
public @Nullable String buildHeaderComments(@Nullable String path, @NotNull String indents) {
|
||||||
List<String> comments = getHeaderComment(path);
|
List<String> comments = getHeaderComment(path);
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
package cc.carm.lib.configuration.yaml;
|
package cc.carm.lib.configuration.yaml;
|
||||||
|
|
||||||
import cc.carm.lib.configuration.core.ConfigInitializer;
|
import cc.carm.lib.configuration.core.ConfigInitializer;
|
||||||
|
import cc.carm.lib.configuration.core.source.ConfigurationComments;
|
||||||
import cc.carm.lib.configuration.core.source.impl.FileConfigProvider;
|
import cc.carm.lib.configuration.core.source.impl.FileConfigProvider;
|
||||||
import org.bspfsystems.yamlconfiguration.file.YamlConfiguration;
|
import org.bspfsystems.yamlconfiguration.file.YamlConfiguration;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.jetbrains.annotations.Nullable;
|
import org.jetbrains.annotations.Nullable;
|
||||||
import org.jetbrains.annotations.Unmodifiable;
|
|
||||||
|
|
||||||
import java.io.BufferedWriter;
|
import java.io.BufferedWriter;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -13,7 +13,6 @@ import java.io.StringWriter;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class YAMLConfigProvider extends FileConfigProvider<YAMLSectionWrapper> {
|
public class YAMLConfigProvider extends FileConfigProvider<YAMLSectionWrapper> {
|
||||||
|
|
||||||
@@ -38,11 +37,17 @@ public class YAMLConfigProvider extends FileConfigProvider<YAMLSectionWrapper> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void reload() throws Exception {
|
protected void onReload() throws Exception {
|
||||||
configuration.load(getFile());
|
configuration.load(getFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
public @Nullable ConfigurationComments getComments() {
|
||||||
|
return this.comments;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@SuppressWarnings("SpellCheckingInspection")
|
||||||
public void save() throws Exception {
|
public void save() throws Exception {
|
||||||
configuration.save(getFile());
|
configuration.save(getFile());
|
||||||
|
|
||||||
@@ -60,28 +65,6 @@ public class YAMLConfigProvider extends FileConfigProvider<YAMLSectionWrapper> {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setHeaderComment(@Nullable String path, @Nullable List<String> comments) {
|
|
||||||
this.comments.setHeaderComments(path, comments);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void setInlineComment(@NotNull String path, @Nullable String comment) {
|
|
||||||
this.comments.setInlineComment(path, comment);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
@Nullable
|
|
||||||
@Unmodifiable
|
|
||||||
public List<String> getHeaderComment(@Nullable String path) {
|
|
||||||
return this.comments.getHeaderComment(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public @Nullable String getInlineComment(@NotNull String path) {
|
|
||||||
return this.comments.getInlineComment(path);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull ConfigInitializer<YAMLConfigProvider> getInitializer() {
|
public @NotNull ConfigInitializer<YAMLConfigProvider> getInitializer() {
|
||||||
return this.initializer;
|
return this.initializer;
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import java.util.List;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
public class YAMLSectionWrapper implements ConfigurationWrapper {
|
public class YAMLSectionWrapper implements ConfigurationWrapper<ConfigurationSection> {
|
||||||
|
|
||||||
private final ConfigurationSection section;
|
private final ConfigurationSection section;
|
||||||
|
|
||||||
@@ -25,6 +25,11 @@ public class YAMLSectionWrapper implements ConfigurationWrapper {
|
|||||||
return section == null ? null : new YAMLSectionWrapper(section);
|
return section == null ? null : new YAMLSectionWrapper(section);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull ConfigurationSection getSource() {
|
||||||
|
return this.section;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull Set<String> getKeys(boolean deep) {
|
public @NotNull Set<String> getKeys(boolean deep) {
|
||||||
return new LinkedHashSet<>(section.getKeys(deep));
|
return new LinkedHashSet<>(section.getKeys(deep));
|
||||||
@@ -66,7 +71,7 @@ public class YAMLSectionWrapper implements ConfigurationWrapper {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable ConfigurationWrapper getConfigurationSection(@NotNull String path) {
|
public @Nullable YAMLSectionWrapper getConfigurationSection(@NotNull String path) {
|
||||||
return of(this.section.getConfigurationSection(path));
|
return of(this.section.getConfigurationSection(path));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -16,7 +16,7 @@ import java.util.UUID;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.IntStream;
|
import java.util.stream.IntStream;
|
||||||
|
|
||||||
public class ConfigTester {
|
public class DemoConfigTest {
|
||||||
|
|
||||||
static {
|
static {
|
||||||
ConfigurationSerialization.registerClass(TestModel.class);
|
ConfigurationSerialization.registerClass(TestModel.class);
|
||||||
@@ -3,17 +3,16 @@ package config;
|
|||||||
import config.offset.FieldOffset;
|
import config.offset.FieldOffset;
|
||||||
import config.offset.OffsetUtil;
|
import config.offset.OffsetUtil;
|
||||||
import config.source.DemoConfiguration;
|
import config.source.DemoConfiguration;
|
||||||
import org.junit.Test;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class OffsetTest {
|
public class OffsetTest {
|
||||||
|
|
||||||
@Test
|
// @Test
|
||||||
public void test() {
|
public void test() {
|
||||||
//
|
//
|
||||||
// output(OffsetUtil.getClassMemberOffset(DemoConfiguration.class));
|
output(OffsetUtil.getClassMemberOffset(DemoConfiguration.class));
|
||||||
// output(OffsetUtil.getClassMemberOffset(DemoConfiguration.Sub.class));
|
output(OffsetUtil.getClassMemberOffset(DemoConfiguration.Sub.class));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import java.util.Map;
|
|||||||
@SerializableAs("SomeModel")
|
@SerializableAs("SomeModel")
|
||||||
public class SomeModel extends AbstractModel implements ConfigurationSerializable {
|
public class SomeModel extends AbstractModel implements ConfigurationSerializable {
|
||||||
|
|
||||||
int num;
|
public final int num;
|
||||||
|
|
||||||
public SomeModel(@NotNull String name, int num) {
|
public SomeModel(@NotNull String name, int num) {
|
||||||
super(name);
|
super(name);
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public class TestModel extends AbstractModel implements ConfigurationSerializabl
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static TestModel deserialize(ConfigurationWrapper section) {
|
public static TestModel deserialize(ConfigurationWrapper<?> section) {
|
||||||
String name = section.getString("name");
|
String name = section.getString("name");
|
||||||
if (name == null) throw new NullPointerException("name is null");
|
if (name == null) throw new NullPointerException("name is null");
|
||||||
String uuidString = section.getString("info.uuid");
|
String uuidString = section.getString("info.uuid");
|
||||||
|
|||||||
@@ -15,11 +15,12 @@
|
|||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>easyconfiguration-parent</artifactId>
|
<artifactId>easyconfiguration-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>3.0.0</version>
|
<version>3.2.0</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>core</module>
|
<module>core</module>
|
||||||
<module>impl/yaml</module>
|
<module>impl/yaml</module>
|
||||||
<module>impl/json</module>
|
<module>impl/json</module>
|
||||||
|
<module>impl/sql</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>EasyConfiguration</name>
|
<name>EasyConfiguration</name>
|
||||||
@@ -90,7 +91,7 @@
|
|||||||
<downloadUrl>https://github.com/CarmJos/EasyConfiguration/releases</downloadUrl>
|
<downloadUrl>https://github.com/CarmJos/EasyConfiguration/releases</downloadUrl>
|
||||||
<site>
|
<site>
|
||||||
<id>javadoc</id>
|
<id>javadoc</id>
|
||||||
<name>EasyConfiguration JavaDoc (on Github Pages)</name>
|
<name>EasyConfiguration JavaDoc (on GitHub Pages)</name>
|
||||||
<url>https://CarmJos.github.io/EasyConfiguration</url>
|
<url>https://CarmJos.github.io/EasyConfiguration</url>
|
||||||
</site>
|
</site>
|
||||||
</distributionManagement>
|
</distributionManagement>
|
||||||
@@ -164,7 +165,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
<version>3.4.0</version>
|
<version>3.4.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<classifier>javadoc</classifier>
|
<classifier>javadoc</classifier>
|
||||||
<detectJavaApiLink>false</detectJavaApiLink>
|
<detectJavaApiLink>false</detectJavaApiLink>
|
||||||
|
|||||||
Reference in New Issue
Block a user