mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
Compare commits
44 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 85266283c4 | |||
| b0a9f6505c | |||
| 8c40eb20ea | |||
| 25ff7ab350 | |||
| ad90251596 | |||
| ed05374054 | |||
| b5681f2412 | |||
| bd9923ab7e | |||
| 9dece6004e | |||
| 654782afe1 | |||
| 903f0239b2 | |||
| dda929c0a9 | |||
| 2482048449 | |||
| f54ee83938 | |||
| f5316eb320 | |||
| 500eebefde | |||
| d9cb95b2e9 | |||
| ce6554c3f1 | |||
| 7dcd690a05 | |||
| f376f22ad0 | |||
| ab586c4b00 | |||
| 64cbfaa974 | |||
| 3cab343919 | |||
| 1ad8c1f407 | |||
| 4e6db50049 | |||
| e62cef5644 | |||
| d6a56003aa | |||
| 8a5870300d | |||
| 42885b2a12 | |||
| 96216d5126 | |||
| d890ce1b94 | |||
| d1ff4f7014 | |||
| 9f3089566c | |||
| 79105bf400 | |||
| 2b0b74af92 | |||
| c65d164167 | |||
| 74bde0c7ea | |||
| 7fba61cb64 | |||
| b609e1d174 | |||
| bdbd484690 | |||
| cc5383b0f2 | |||
| 35d2653f56 | |||
| d6fa7710dc | |||
| fdb6d81bf0 |
@@ -1,70 +1,34 @@
|
|||||||
---
|
---
|
||||||
name:
|
name: Submit bugs&issues
|
||||||
问题提交
|
about: Describe the problem and submit it to help us review and fix it.
|
||||||
about:
|
title: 'fix: '
|
||||||
描述问题并提交,帮助我们对其进行检查与修复。
|
labels: bug
|
||||||
title: ''
|
|
||||||
labels:
|
|
||||||
bug
|
|
||||||
assignees: ''
|
assignees: ''
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
###
|
### **Description**
|
||||||
*
|
|
||||||
*问题简述
|
|
||||||
**
|
|
||||||
|
|
||||||
用简短的话语描述一下大概问题。
|
<!-- Describe the general problem in short words.-->
|
||||||
|
|
||||||
###
|
### **Operations**
|
||||||
*
|
|
||||||
*问题来源
|
|
||||||
**
|
|
||||||
|
|
||||||
描述一下通过哪些操作才发现的问题,如:
|
<!--
|
||||||
|
Describe the problem discovered through what operations, such as:
|
||||||
|
|
||||||
1.
|
1. Clicked '...'
|
||||||
使用了 '...'
|
2. Typed '....'
|
||||||
2.
|
3. Error says '....'
|
||||||
输入了 '....'
|
-->
|
||||||
3.
|
|
||||||
出现了报错 '....'
|
|
||||||
|
|
||||||
###
|
### **Expected result** _(Optional)_
|
||||||
*
|
|
||||||
*预期结果
|
|
||||||
** (可选)
|
|
||||||
|
|
||||||
如果问题不发生,应该是什么情况
|
### **Screenshots & Error Logs**
|
||||||
|
|
||||||
###
|
### **Environment**
|
||||||
*
|
|
||||||
*问题截图/问题报错
|
|
||||||
**
|
|
||||||
|
|
||||||
如果有报错或输出,请提供截图。
|
- System: `Windows 10` / `Ubuntu` / `...`
|
||||||
|
- Java version: `JDK11` / `OPENJDK8` / `JRE8` / `...`
|
||||||
|
|
||||||
###
|
### **Anything else...**
|
||||||
*
|
|
||||||
*操作环境
|
|
||||||
**
|
|
||||||
|
|
||||||
-
|
<!-- If there are other supplements, they can be described here. -->
|
||||||
系统环境:
|
|
||||||
`Windows 10` /
|
|
||||||
`Ubuntu` /
|
|
||||||
`...`
|
|
||||||
-
|
|
||||||
Java版本:
|
|
||||||
`JDK11` /
|
|
||||||
`OPENJDK8` /
|
|
||||||
`JRE8` /
|
|
||||||
`...`
|
|
||||||
|
|
||||||
###
|
|
||||||
*
|
|
||||||
*其他补充
|
|
||||||
**
|
|
||||||
|
|
||||||
如有其他补充,可以在这里描述。
|
|
||||||
|
|||||||
@@ -1,38 +1,23 @@
|
|||||||
---
|
---
|
||||||
name:
|
name: Features
|
||||||
功能需求
|
about: Ask for new features.
|
||||||
about:
|
title: 'feat: '
|
||||||
希望我们提供更多的功能。
|
labels: enhancement
|
||||||
title: ''
|
|
||||||
labels:
|
|
||||||
enhancement
|
|
||||||
assignees: ''
|
assignees: ''
|
||||||
---
|
---
|
||||||
|
|
||||||
###
|
### **Description**
|
||||||
*
|
|
||||||
*功能简述
|
|
||||||
**
|
|
||||||
|
|
||||||
简单的描述一下你想要的功能
|
<!-- Describe the features in short words.-->
|
||||||
|
|
||||||
###
|
### **Source**
|
||||||
*
|
|
||||||
*需求来源
|
|
||||||
**
|
|
||||||
|
|
||||||
简单的描述一下为什么需要这个功能。
|
<!-- Describe the reason that you need this feature in short words.-->
|
||||||
|
|
||||||
###
|
### **Examples** _(Optional)_
|
||||||
*
|
|
||||||
*功能参考
|
|
||||||
**(可选)
|
|
||||||
|
|
||||||
如果有相关功能的参考,如文本、截图,请提供给我们。
|
<!--Any screenshots or example codes please.-->
|
||||||
|
|
||||||
###
|
### **Additional details**
|
||||||
*
|
|
||||||
*附加内容
|
|
||||||
**
|
|
||||||
|
|
||||||
如果有什么小细节需要重点注意,请在这里告诉我们。
|
<!--If there are any small details that need to be highlighted, please let us know here.-->
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@v4
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
# If you wish to specify custom queries, you can do so here or in a config file.
|
# If you wish to specify custom queries, you can do so here or in a config file.
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
||||||
# If this step fails, then you should remove it and run the build manually (see below)
|
# If this step fails, then you should remove it and run the build manually (see below)
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@v4
|
||||||
|
|
||||||
# ℹ️ Command-line programs to run using the OS shell.
|
# ℹ️ Command-line programs to run using the OS shell.
|
||||||
# 📚 https://git.io/JvXDl
|
# 📚 https://git.io/JvXDl
|
||||||
@@ -67,4 +67,4 @@ jobs:
|
|||||||
# make release
|
# make release
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@v4
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: "Set up JDK"
|
- name: "Set up JDK"
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
@@ -87,7 +87,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: "Set up JDK"
|
- name: "Set up JDK"
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@v6
|
||||||
- name: "Set up JDK"
|
- name: "Set up JDK"
|
||||||
uses: actions/setup-java@v5
|
uses: actions/setup-java@v5
|
||||||
with:
|
with:
|
||||||
@@ -26,7 +26,7 @@ jobs:
|
|||||||
- name: "Target Stage"
|
- name: "Target Stage"
|
||||||
run: mkdir staging && cp */target/*.jar staging
|
run: mkdir staging && cp */target/*.jar staging
|
||||||
- name: "Upload artifact"
|
- name: "Upload artifact"
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: Artifact
|
name: Artifact
|
||||||
path: staging
|
path: staging
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
+2
-2
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
<maven.deploy.skip>true</maven.deploy.skip>
|
<maven.deploy.skip>true</maven.deploy.skip>
|
||||||
|
|
||||||
<deps.mysql-driver.version>8.0.33</deps.mysql-driver.version>
|
<deps.mysql-driver.version>8.0.33</deps.mysql-driver.version>
|
||||||
<log4j.version>2.25.2</log4j.version>
|
<log4j.version>2.26.0</log4j.version>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>configured-demo</artifactId>
|
<artifactId>configured-demo</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
<kotlin.version>2.2.20</kotlin.version>
|
<kotlin.version>2.3.21</kotlin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<artifactId>configured-feature-kotlin</artifactId>
|
<artifactId>configured-feature-kotlin</artifactId>
|
||||||
@@ -86,7 +86,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.jetbrains.dokka</groupId>
|
<groupId>org.jetbrains.dokka</groupId>
|
||||||
<artifactId>dokka-maven-plugin</artifactId>
|
<artifactId>dokka-maven-plugin</artifactId>
|
||||||
<version>2.0.0</version>
|
<version>2.2.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>pre-site</phase>
|
<phase>pre-site</phase>
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
<?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">
|
||||||
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
<parent>
|
||||||
|
<groupId>cc.carm.lib</groupId>
|
||||||
|
<artifactId>configured-parent</artifactId>
|
||||||
|
<version>4.2.1</version>
|
||||||
|
<relativePath>../../pom.xml</relativePath>
|
||||||
|
</parent>
|
||||||
|
<properties>
|
||||||
|
<maven.compiler.source>${project.jdk.version}</maven.compiler.source>
|
||||||
|
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
||||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
|
<kotlin.version>2.3.10</kotlin.version>
|
||||||
|
</properties>
|
||||||
|
<artifactId>configured-feature-multi</artifactId>
|
||||||
|
<packaging>jar</packaging>
|
||||||
|
|
||||||
|
<name>Configured - Record Feature</name>
|
||||||
|
<url>https://github.com/CarmJos/configured</url>
|
||||||
|
<description>Provides Java record type support for the Configured framework.</description>
|
||||||
|
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cc.carm.lib</groupId>
|
||||||
|
<artifactId>configured-core</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cc.carm.lib</groupId>
|
||||||
|
<artifactId>configured-feature-file</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<dependency>
|
||||||
|
<groupId>cc.carm.lib</groupId>
|
||||||
|
<artifactId>configured-yaml</artifactId>
|
||||||
|
<version>${project.version}</version>
|
||||||
|
<scope>test</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
</dependencies>
|
||||||
|
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</project>
|
||||||
@@ -0,0 +1,135 @@
|
|||||||
|
package cc.carm.lib.configuration.multi;
|
||||||
|
|
||||||
|
import cc.carm.lib.configuration.source.ConfigurationHolder;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.jetbrains.annotations.Nullable;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
public abstract class MultiConfiguration<K, T> {
|
||||||
|
|
||||||
|
protected final ConcurrentHashMap<K, T> valuesCache = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
public MultiConfiguration() {
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Read the value of the key from the holder, and return the value.
|
||||||
|
*
|
||||||
|
* @param key The key of the value to read.
|
||||||
|
* @param holder The holder of the value to read.
|
||||||
|
* @return The value of the key, or null if the value is not exist.
|
||||||
|
*/
|
||||||
|
public abstract T read(@NotNull K key, @NotNull ConfigurationHolder<?> holder);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write (and save) the value of the key to the holder, then update the cache.
|
||||||
|
*
|
||||||
|
* @param holder The holder of the value to write.
|
||||||
|
* @param value The value to write, which should not be null.
|
||||||
|
*/
|
||||||
|
public abstract void write(@NotNull ConfigurationHolder<?> holder, @NotNull T value);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all holders of the configuration, which should be a concurrent map to support concurrent access.
|
||||||
|
*
|
||||||
|
* @return All holders of the configuration.
|
||||||
|
*/
|
||||||
|
public abstract @NotNull Map<K, ConfigurationHolder<?>> holders();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the holder of the key.
|
||||||
|
* If the holder of the key is not exist,
|
||||||
|
* it should be created then return the created holder.
|
||||||
|
*
|
||||||
|
* @param key The key of the holder to get.
|
||||||
|
* @return The holder of the key.
|
||||||
|
*/
|
||||||
|
public abstract @NotNull ConfigurationHolder<?> holder(@NotNull K key);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Remove the holder of the key, and remove the value of the key from the cache.
|
||||||
|
* Also delete the configuration file if necessary.
|
||||||
|
*
|
||||||
|
* @param key The key of the holder to remove.
|
||||||
|
*/
|
||||||
|
public abstract void removeHolder(@NotNull K key);
|
||||||
|
|
||||||
|
public void loadAll() {
|
||||||
|
for (Map.Entry<K, ConfigurationHolder<?>> entry : holders().entrySet()) {
|
||||||
|
K key = entry.getKey();
|
||||||
|
ConfigurationHolder<?> holder = entry.getValue();
|
||||||
|
try {
|
||||||
|
T loaded = read(key, holder);
|
||||||
|
if (loaded != null) {
|
||||||
|
valuesCache.put(key, loaded);
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void saveAll() {
|
||||||
|
for (Map.Entry<K, T> entry : valuesCache.entrySet()) {
|
||||||
|
K key = entry.getKey();
|
||||||
|
T value = entry.getValue();
|
||||||
|
ConfigurationHolder<?> holder = holder(key);
|
||||||
|
try {
|
||||||
|
write(holder, value);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all keys in the cache.
|
||||||
|
*
|
||||||
|
* @return All keys in the cache.
|
||||||
|
*/
|
||||||
|
public @NotNull Set<K> keys() {
|
||||||
|
return valuesCache.keySet();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get all values in the cache.
|
||||||
|
*
|
||||||
|
* @return All values in the cache.
|
||||||
|
*/
|
||||||
|
public @NotNull Map<K, T> values() {
|
||||||
|
return this.valuesCache;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the value of the key, or null if the value is not exist.
|
||||||
|
*
|
||||||
|
* @param key The key of the value to get.
|
||||||
|
* @return The value of the key, or null if the value is not exist.
|
||||||
|
*/
|
||||||
|
public @Nullable T get(@NotNull K key) {
|
||||||
|
return valuesCache.get(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Update the value of the key, and return the old value.
|
||||||
|
*
|
||||||
|
* @param key The key of the value to update.
|
||||||
|
* @param value The new value, or null to remove the value.
|
||||||
|
* @return The old value, or null if the value is not exist.
|
||||||
|
*/
|
||||||
|
public @Nullable T update(@NotNull K key, @Nullable T value) {
|
||||||
|
if (value == null) {
|
||||||
|
T current = valuesCache.remove(key);
|
||||||
|
removeHolder(key);
|
||||||
|
return current;
|
||||||
|
}
|
||||||
|
ConfigurationHolder<?> holder = holder(key);
|
||||||
|
write(holder, value);
|
||||||
|
return valuesCache.put(key, value);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+73
@@ -0,0 +1,73 @@
|
|||||||
|
package cc.carm.lib.configuration.multi;
|
||||||
|
|
||||||
|
import cc.carm.lib.configuration.source.ConfigurationHolder;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
|
public abstract class MultiFileConfiguration<K, T> extends MultiConfiguration<K, T> {
|
||||||
|
|
||||||
|
protected final @NotNull File dataFolder;
|
||||||
|
protected final @NotNull String extensionSuffix; // e.g. ".yml"
|
||||||
|
|
||||||
|
protected final ConcurrentHashMap<K, ConfigurationHolder<?>> holders = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
|
public MultiFileConfiguration(@NotNull File dataFolder, @NotNull String extensionSuffix) {
|
||||||
|
this.dataFolder = dataFolder;
|
||||||
|
this.extensionSuffix = extensionSuffix;
|
||||||
|
|
||||||
|
// Load existing configuration files
|
||||||
|
if (dataFolder.exists() && dataFolder.isDirectory()) {
|
||||||
|
File[] files = dataFolder.listFiles((dir, name) -> name.endsWith(extensionSuffix));
|
||||||
|
if (files != null) {
|
||||||
|
for (File file : files) {
|
||||||
|
String fileName = file.getName();
|
||||||
|
String keyStr = fileName.substring(0, fileName.length() - extensionSuffix.length()); // Remove extension suffix
|
||||||
|
try {
|
||||||
|
holders.put(extractKeyFromFilename(keyStr), loadHolder(file));
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
loadAll();
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract K extractKeyFromFilename(@NotNull String fileName);
|
||||||
|
|
||||||
|
public String keyToFilename(@NotNull K key) {
|
||||||
|
return key.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public abstract ConfigurationHolder<?> loadHolder(@NotNull File file);
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull Map<K, ConfigurationHolder<?>> holders() {
|
||||||
|
return this.holders;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public @NotNull ConfigurationHolder<?> holder(@NotNull K key) {
|
||||||
|
ConfigurationHolder<?> loaded = holders.get(key);
|
||||||
|
if (loaded != null) return loaded;
|
||||||
|
|
||||||
|
File file = new File(dataFolder, keyToFilename(key) + this.extensionSuffix);
|
||||||
|
ConfigurationHolder<?> created = loadHolder(file);
|
||||||
|
holders.put(key, created);
|
||||||
|
return created;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void removeHolder(@NotNull K key) {
|
||||||
|
ConfigurationHolder<?> loaded = holders.remove(key);
|
||||||
|
if (loaded == null) return;
|
||||||
|
|
||||||
|
File file = new File(dataFolder, key + ".yml");
|
||||||
|
if (file.exists()) file.delete();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,77 @@
|
|||||||
|
package cc.carm.lib.configuration.tests;
|
||||||
|
|
||||||
|
import cc.carm.lib.configuration.multi.MultiFileConfiguration;
|
||||||
|
import cc.carm.lib.configuration.source.ConfigurationHolder;
|
||||||
|
import cc.carm.lib.configuration.source.section.ConfigureSection;
|
||||||
|
import cc.carm.lib.configuration.source.yaml.YAMLConfigFactory;
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class MultiFileTests {
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void test() {
|
||||||
|
|
||||||
|
ProfileStorage storage = new ProfileStorage(new File(new File("target"), "test-profiles"));
|
||||||
|
|
||||||
|
// Add (or create) a new entry to file.
|
||||||
|
UserProfile profile = new UserProfile(UUID.randomUUID(), "John Doe", "john@google.com", "123123123");
|
||||||
|
storage.update(profile.getUniqueId(), profile);
|
||||||
|
|
||||||
|
// Read files.
|
||||||
|
System.out.println("Current users: ");
|
||||||
|
storage.values().forEach((k, v) -> {
|
||||||
|
System.out.println("# " + k);
|
||||||
|
System.out.println("- " + v.getName() + " (" + v.getEmail() + ", " + v.getPhone() + ")");
|
||||||
|
});
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public static class ProfileStorage extends MultiFileConfiguration<UUID, UserProfile> {
|
||||||
|
|
||||||
|
|
||||||
|
public ProfileStorage(@NotNull File dataFolder) {
|
||||||
|
super(dataFolder, ".yml");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UserProfile read(@NotNull UUID key, @NotNull ConfigurationHolder<?> holder) {
|
||||||
|
ConfigureSection conf = holder.config();
|
||||||
|
return new UserProfile(
|
||||||
|
key,
|
||||||
|
conf.getString("name", "Unknown"),
|
||||||
|
conf.getString("email", "unset"),
|
||||||
|
conf.getString("phone", "123123123")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void write(@NotNull ConfigurationHolder<?> holder, @NotNull UserProfile value) {
|
||||||
|
ConfigureSection conf = holder.config();
|
||||||
|
conf.set("name", value.getName());
|
||||||
|
conf.set("email", value.getEmail());
|
||||||
|
conf.set("phone", value.getPhone());
|
||||||
|
try {
|
||||||
|
holder.save();
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public UUID extractKeyFromFilename(@NotNull String fileName) {
|
||||||
|
return UUID.fromString(fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ConfigurationHolder<?> loadHolder(@NotNull File file) {
|
||||||
|
return YAMLConfigFactory.from(file).build();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
package cc.carm.lib.configuration.tests;
|
||||||
|
|
||||||
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
|
public class UserProfile {
|
||||||
|
|
||||||
|
protected final @NotNull UUID uuid;
|
||||||
|
protected final @NotNull String name;
|
||||||
|
protected final @NotNull String email;
|
||||||
|
protected final @NotNull String phone;
|
||||||
|
|
||||||
|
public UserProfile(@NotNull UUID uuid, @NotNull String name, @NotNull String email, @NotNull String phone) {
|
||||||
|
this.uuid = uuid;
|
||||||
|
this.name = name;
|
||||||
|
this.email = email;
|
||||||
|
this.phone = phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public @NotNull UUID getUniqueId() {
|
||||||
|
return uuid;
|
||||||
|
}
|
||||||
|
|
||||||
|
public @NotNull String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public @NotNull String getEmail() {
|
||||||
|
return email;
|
||||||
|
}
|
||||||
|
|
||||||
|
public @NotNull String getPhone() {
|
||||||
|
return phone;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean equals(Object o) {
|
||||||
|
if (!(o instanceof UserProfile)) return false;
|
||||||
|
UserProfile that = (UserProfile) o;
|
||||||
|
return Objects.equals(name, that.name) && Objects.equals(email, that.email) && Objects.equals(phone, that.phone);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int hashCode() {
|
||||||
|
return Objects.hash(name, email, phone);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
+2
-1
@@ -39,7 +39,8 @@ public abstract class ContentInserter<RECEIVER> implements Comparable<ContentIns
|
|||||||
@NotNull Insertable<RECEIVER, ?> insertions) {
|
@NotNull Insertable<RECEIVER, ?> insertions) {
|
||||||
Matcher matcher = matcher(line);
|
Matcher matcher = matcher(line);
|
||||||
if (!matcher.matches()) return null;
|
if (!matcher.matches()) return null;
|
||||||
if (!insertions.inserting(extractID(matcher))) return Collections.emptyList();
|
String id = extractID(matcher);
|
||||||
|
if (id == null || !insertions.inserting(id)) return Collections.emptyList();
|
||||||
return get(receiver, matcher, insertions);
|
return get(receiver, matcher, insertions);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
@@ -47,8 +47,13 @@ public abstract class ContentReplacer<RECEIVER> implements Comparable<ContentRep
|
|||||||
Matcher matcher = matcher(text);
|
Matcher matcher = matcher(text);
|
||||||
StringBuffer sb = new StringBuffer();
|
StringBuffer sb = new StringBuffer();
|
||||||
while (matcher.find()) {
|
while (matcher.find()) {
|
||||||
|
try {
|
||||||
String replaced = get(receiver, matcher);
|
String replaced = get(receiver, matcher);
|
||||||
matcher.appendReplacement(sb, replaced == null ? "" : replaced);
|
matcher.appendReplacement(sb, replaced == null ? "" : replaced);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
// Do nothing if exception occurred.
|
||||||
|
ex.printStackTrace(); // for debug
|
||||||
|
}
|
||||||
}
|
}
|
||||||
matcher.appendTail(sb);
|
matcher.appendTail(sb);
|
||||||
return sb.toString();
|
return sb.toString();
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -10,13 +10,13 @@
|
|||||||
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
<kotlin.version>2.2.20</kotlin.version>
|
<kotlin.version>2.3.21</kotlin.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<modules>
|
<modules>
|
||||||
<module>core</module>
|
<module>core</module>
|
||||||
<module>features/section</module>
|
<module>features/section</module>
|
||||||
@@ -37,6 +37,7 @@
|
|||||||
<module>providers/mongodb</module>
|
<module>providers/mongodb</module>
|
||||||
|
|
||||||
<module>demo</module>
|
<module>demo</module>
|
||||||
|
<module>features/multi</module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<name>configured</name>
|
<name>configured</name>
|
||||||
@@ -121,7 +122,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.jetbrains</groupId>
|
<groupId>org.jetbrains</groupId>
|
||||||
<artifactId>annotations</artifactId>
|
<artifactId>annotations</artifactId>
|
||||||
<version>26.0.2-1</version>
|
<version>26.1.0</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
@@ -134,7 +135,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>3.5.4</version>
|
<version>3.5.6</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<useSystemClassLoader>false</useSystemClassLoader>
|
<useSystemClassLoader>false</useSystemClassLoader>
|
||||||
</configuration>
|
</configuration>
|
||||||
@@ -162,7 +163,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-release-plugin</artifactId>
|
<artifactId>maven-release-plugin</artifactId>
|
||||||
<version>3.1.1</version>
|
<version>3.3.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<autoVersionSubmodules>true</autoVersionSubmodules>
|
<autoVersionSubmodules>true</autoVersionSubmodules>
|
||||||
<useReleaseProfile>false</useReleaseProfile>
|
<useReleaseProfile>false</useReleaseProfile>
|
||||||
@@ -204,7 +205,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.14.1</version>
|
<version>3.15.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<source>${project.jdk.version}</source>
|
<source>${project.jdk.version}</source>
|
||||||
<target>${project.jdk.version}</target>
|
<target>${project.jdk.version}</target>
|
||||||
@@ -216,13 +217,13 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-jar-plugin</artifactId>
|
<artifactId>maven-jar-plugin</artifactId>
|
||||||
<version>3.4.2</version>
|
<version>3.5.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-source-plugin</artifactId>
|
<artifactId>maven-source-plugin</artifactId>
|
||||||
<version>3.3.1</version>
|
<version>3.4.0</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@@ -236,7 +237,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-shade-plugin</artifactId>
|
<artifactId>maven-shade-plugin</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.2</version>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<phase>package</phase>
|
<phase>package</phase>
|
||||||
@@ -283,7 +284,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.sonatype.central</groupId>
|
<groupId>org.sonatype.central</groupId>
|
||||||
<artifactId>central-publishing-maven-plugin</artifactId>
|
<artifactId>central-publishing-maven-plugin</artifactId>
|
||||||
<version>0.9.0</version>
|
<version>0.10.0</version>
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
<configuration>
|
<configuration>
|
||||||
<publishingServerId>central</publishingServerId>
|
<publishingServerId>central</publishingServerId>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.13.2</version>
|
<version>2.14.0</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.typesafe</groupId>
|
<groupId>com.typesafe</groupId>
|
||||||
<artifactId>config</artifactId>
|
<artifactId>config</artifactId>
|
||||||
<version>1.4.5</version>
|
<version>1.4.9</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
@@ -14,7 +14,7 @@
|
|||||||
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
<maven.compiler.target>${project.jdk.version}</maven.compiler.target>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
<maven.compiler.encoding>UTF-8</maven.compiler.encoding>
|
||||||
<deps.mongodb.version>5.6.0</deps.mongodb.version>
|
<deps.mongodb.version>5.8.0</deps.mongodb.version>
|
||||||
</properties>
|
</properties>
|
||||||
<artifactId>configured-mongodb</artifactId>
|
<artifactId>configured-mongodb</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.google.code.gson</groupId>
|
<groupId>com.google.code.gson</groupId>
|
||||||
<artifactId>gson</artifactId>
|
<artifactId>gson</artifactId>
|
||||||
<version>2.13.2</version>
|
<version>2.14.0</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<artifactId>configured-parent</artifactId>
|
<artifactId>configured-parent</artifactId>
|
||||||
<groupId>cc.carm.lib</groupId>
|
<groupId>cc.carm.lib</groupId>
|
||||||
<version>4.2.0</version>
|
<version>4.2.1</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
<relativePath>../../pom.xml</relativePath>
|
||||||
</parent>
|
</parent>
|
||||||
<properties>
|
<properties>
|
||||||
@@ -63,7 +63,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.yaml</groupId>
|
<groupId>org.yaml</groupId>
|
||||||
<artifactId>snakeyaml</artifactId>
|
<artifactId>snakeyaml</artifactId>
|
||||||
<version>2.5</version>
|
<version>2.6</version>
|
||||||
<scope>compile</scope>
|
<scope>compile</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user