reports-service завершение работы сразу (доделать для сервиса, пока из консоли выключится сразу)
This commit is contained in:
parent
363a809afc
commit
960d0e6b68
1 changed files with 2 additions and 0 deletions
|
|
@ -36,6 +36,8 @@ public class ReportsServiceApplication {
|
|||
LocalDate date1 = LocalDate.of(date2.getYear(), date2.getMonth(), 1);//date2.minusMonths(1);
|
||||
xmlReportBuilder.createReport(date1, date2);
|
||||
}
|
||||
log.info("Shutdown application after work");
|
||||
context.close(); // todo если будет запущен как сервис, сделать выход опционально, по другому.
|
||||
} catch (Throwable e) {
|
||||
LoggerFactory.getLogger(ReportsServiceApplication.class).error("Report-service start failed: {} -> {}", e.getClass().getSimpleName(), ExceptionUtils.getStackTrace(e));
|
||||
System.exit(-1);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue