warn instead of throw
This commit is contained in:
parent
b03292b9c2
commit
c249317694
|
@ -47,12 +47,13 @@ public class SpringBootPersistenceApplication implements ApplicationRunner {
|
||||||
jsonLines = ImportUtils.lines(new File(source));
|
jsonLines = ImportUtils.lines(new File(source));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (jsonLines == null || jsonLines.isEmpty())
|
if (jsonLines == null || jsonLines.isEmpty()) {
|
||||||
throw new IllegalArgumentException("no input to import");
|
log.warn(source + " - no input to import");
|
||||||
|
} else {
|
||||||
ImportJsonService importService = context.getBean(ImportJsonService.class);
|
ImportJsonService importService = context.getBean(ImportJsonService.class);
|
||||||
String result = importService.importTo(collection, jsonLines);
|
String result = importService.importTo(collection, jsonLines);
|
||||||
log.info(source + " - result: " + result);
|
log.info(source + " - import result: " + result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue