diff --git a/convert/datacap-convert-json/src/main/kotlin/io/edurt/datacap/convert/json/JsonConvertService.kt b/convert/datacap-convert-json/src/main/kotlin/io/edurt/datacap/convert/json/JsonConvertService.kt
index 8bde50bc..bd0266cf 100644
--- a/convert/datacap-convert-json/src/main/kotlin/io/edurt/datacap/convert/json/JsonConvertService.kt
+++ b/convert/datacap-convert-json/src/main/kotlin/io/edurt/datacap/convert/json/JsonConvertService.kt
@@ -126,6 +126,11 @@ class JsonConvertService : ConvertService
val factory = JsonFactory()
factory.createGenerator(file, JsonEncoding.UTF8)
.use { generator ->
+ // 创建一个新的 ObjectMapper 实例并设置给 generator
+ // Create a new ObjectMapper instance and set it to generator
+ val objectMapper = ObjectMapper()
+ generator.codec = objectMapper.findAndRegisterModules()
+
generator.writeStartArray()
request.columns
.forEach { column ->
@@ -137,9 +142,11 @@ class JsonConvertService : ConvertService
is List<*> -> generator.writeObjectField(request.headers[headerIndex] as String, column[headerIndex])
is ObjectNode ->
{
- generator.codec = ObjectMapper()
val header = request.headers[headerIndex] as String
- generator.writeObjectField(header, column.get(header))
+ // 将 ObjectNode 转换为 Map 再写入
+ // Convert ObjectNode to Map before writing
+ val value = objectMapper.convertValue(column.get(header), Map::class.java)
+ generator.writeObjectField(header, value)
}
else -> generator.writeObjectField(request.headers[headerIndex] as String, column)
diff --git a/core/datacap-plugin/src/main/java/io/edurt/datacap/plugin/PluginManager.java b/core/datacap-plugin/src/main/java/io/edurt/datacap/plugin/PluginManager.java
index e22c7f16..c3b4ff56 100644
--- a/core/datacap-plugin/src/main/java/io/edurt/datacap/plugin/PluginManager.java
+++ b/core/datacap-plugin/src/main/java/io/edurt/datacap/plugin/PluginManager.java
@@ -5,10 +5,12 @@ import com.google.inject.Guice;
import com.google.inject.Injector;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.edurt.datacap.common.utils.DateUtils;
+import io.edurt.datacap.common.utils.EnvironmentUtils;
import io.edurt.datacap.plugin.loader.PluginClassLoader;
import io.edurt.datacap.plugin.loader.PluginLoaderFactory;
import io.edurt.datacap.plugin.loader.TarPluginLoader;
import io.edurt.datacap.plugin.utils.PluginClassLoaderUtils;
+import io.edurt.datacap.plugin.utils.PluginPathUtils;
import io.edurt.datacap.plugin.utils.VersionUtils;
import lombok.Getter;
import lombok.extern.slf4j.Slf4j;
@@ -162,6 +164,12 @@ public class PluginManager
boolean installed;
try {
+ // 如果是IDE环境,或者插件目录是文件,则使用默认目录
+ // Use default directory for IDE environment or if plugins directory is a file
+ if (EnvironmentUtils.isIdeEnvironment() || Files.isRegularFile(config.getPluginsDir())) {
+ config.setPluginsDir(PluginPathUtils.appendPath("plugins"));
+ }
+
// 创建临时目录
// Create temporary directory
tempDir = Files.createTempDirectory(config.getPluginsDir(), TEMP_DIR_PREFIX);
@@ -879,7 +887,11 @@ public class PluginManager
deleteDirectory(pluginLocation);
}
else {
- Files.delete(pluginLocation);
+ // 如果非IDE环境,或者插件目录是文件,才进行删除
+ // Delete only if not in IDE environment, or if the plugin directory is a file
+ if (!EnvironmentUtils.isIdeEnvironment() || !Files.isRegularFile(config.getPluginsDir())) {
+ Files.delete(pluginLocation);
+ }
}
// 删除备份文件
diff --git a/core/datacap-spi/pom.xml b/core/datacap-spi/pom.xml
index d793f9b7..fadd4dc6 100644
--- a/core/datacap-spi/pom.xml
+++ b/core/datacap-spi/pom.xml
@@ -70,18 +70,6 @@
mysql-connector-java
test
-
- io.edurt.datacap
- datacap-shaded-pinot
- ${project.version}
- provided
-
-
- net.suteren.jdbc.influxdb
- influxdb-jdbc
- ${datacap.influxdb.version}
- provided
-
io.edurt.datacap
datacap-convert-spi
diff --git a/logo/convert/csv.svg b/logo/convert/csv.svg
index 087a0f47..f1bc1d08 100644
--- a/logo/convert/csv.svg
+++ b/logo/convert/csv.svg
@@ -1,5 +1,5 @@
-