【问题原因】代码错误
【解决办法】参考下面代码 importSetting.setImportMode(ImportMode.NONE);
importSetting.setSourceFileCharset(Charset.UTF8);
System.out.println(importSetting.getSourceFileType());
importSetting.setImportEmptyDataset(true);
importSetting.setSourceFilePath(sourceFile);
importSetting.setTargetDatasourceConnectionInfo(targetDatasource.getConnectionInfo());
dataImport.getImportSettings().add(importSetting);
//添加进度监听
dataImport.addImportSteppedListener(importSteppedEvent -> System.out.println("totalPercent:" + importSteppedEvent.getTotalPercent()));
ImportResult result = dataImport.run();