WEBBPM-SUPPORT-8471: add liquibase

This commit is contained in:
Хакимуллин Артём 2024-08-20 10:28:41 +03:00
parent 41de80f414
commit b8b95430c6
5 changed files with 10 additions and 5 deletions

View file

@ -1,5 +1,8 @@
package esia.service.impl; package esia.service.impl;
import java.util.List;
import esia.model.OrganizationModel;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
@ -18,12 +21,14 @@ public class ScheduledLoadDataService {
private Boolean isEnableCron; private Boolean isEnableCron;
@Scheduled(cron = "${data.load.cron}") @Scheduled(cron = "${data.load.cron}")
public void loadData(String code) { public List<OrganizationModel> loadDataEveryPeriod(String code) {
if (isEnableCron) { if (isEnableCron) {
log.info("Loading data from database"); log.info("Loading data from database");
//TODO: задание получает справочник и сохраняет его в СУБД. Сделать после добавление таблиц в бд //TODO: задание получает справочник и сохраняет его в СУБД. Сделать после добавление таблиц в бд
} else { } else {
log.debug("Data was not loaded"); log.debug("Data was not loaded");
} }
} }

View file

@ -5,7 +5,7 @@
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd"> xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
<changeSet id="001" author="a.khakimullin" dbms="postgresql"> <changeSet id="001" author="a.khakimullin" dbms="postgresql">
<comment>create table </comment>
</changeSet> </changeSet>
</databaseChangeLog> </databaseChangeLog>

View file

@ -4,7 +4,7 @@
"filter_cleanup_interval_hours": 720, "filter_cleanup_interval_hours": 720,
"filter_cleanup_check_period_minutes": 30, "filter_cleanup_check_period_minutes": 30,
"auth_method": "form", "auth_method": "form",
"enable.version.in.url": "%enable.version.in.url%", "enable.version.in.url": "false",
"guard.confirm_exit": false, "guard.confirm_exit": false,
"message_service_error_timeout": "", "message_service_error_timeout": "",
"message_service_warning_timeout": "", "message_service_warning_timeout": "",

View file

@ -1 +1 @@
%project.version% 1.0.0-SNAPSHOT

View file

@ -21,7 +21,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<enable.version.in.url>false</enable.version.in.url> <enable.version.in.url>false</enable.version.in.url>
<joda-time.version>2.9.2</joda-time.version> <joda-time.version>2.9.2</joda-time.version>
<webbpm-platform.version>3.177.0</webbpm-platform.version> <webbpm-platform.version>3.178.0-SNAPSHOT</webbpm-platform.version>
<wbp.overall-timeout>72000</wbp.overall-timeout> <wbp.overall-timeout>72000</wbp.overall-timeout>
<jasperreports.version>6.15.0</jasperreports.version> <jasperreports.version>6.15.0</jasperreports.version>
</properties> </properties>