mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
feat(section): Add ConfigureSection#asMap function
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>easyconfiguration-parent</artifactId>
|
||||
<groupId>cc.carm.lib</groupId>
|
||||
<version>4.0.8</version>
|
||||
<version>4.0.9</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
+1
-1
@@ -55,7 +55,7 @@ public class MongoSource extends ConfigureSource<SourcedSection, Map<String, Obj
|
||||
|
||||
@Override
|
||||
public void save() throws Exception {
|
||||
Map<String, Object> data = this.rootSection.rawMap();
|
||||
Map<String, Object> data = this.rootSection.asMap();
|
||||
if (data.isEmpty()) return; // Skip saving if empty
|
||||
if (data.containsKey("_id") && data.size() == 1) return; // Skip saving if only contains _id
|
||||
|
||||
|
||||
Reference in New Issue
Block a user