Commit 64d7c639 authored by Enriko Käsper's avatar Enriko Käsper
Browse files

Merge branch 'develop' into 'master'

Release: merge 'develop' into 'master' created by Enriko Käsper

See merge request teis/scheduler-service!26
parents cac2fa65 bc117e03
# Changelog
## [1.12.0] - 2020-10-30
* removed Camunda BPMN dependency
* updated Spring Boot framework to version 2.3.4.RELEASE
* updated teis-gradle-plugin version to latest which contains different Gradle dependency configuration sets (functionalities) and therefore Gradle configuration was stripped down from microservice configuration
* updated Gradle Wrapper to version 5.6.4
\ No newline at end of file
......@@ -56,7 +56,6 @@ allprojects {
dependencies {
compile "ee.sm.ti.teis:service-common-lib:${commonsVersion}"
compile "ee.sm.ti.teis:domain-request-lib:${commonsVersion}"
compile "ee.sm.ti.teis:admin-api-gateway-lib:${adminApiGatewayVersion}"
}
}
theGroup=ee.sm.ti.teis
theVersion=1.11.0
commonsVersion=1.10.0
commonApiGatewayVersion=1.8.0
adminApiGatewayVersion=1.5.0
pluginVersion=1.1.1
mapstructVersion=1.3.0.Final
theVersion=1.12.0
commonsVersion=1.14.0
commonApiGatewayVersion=1.14.0
adminApiGatewayVersion=1.7.0
pluginVersion=1.2.0
#Mon Aug 12 17:49:46 EEST 2019
distributionUrl=https\://repo.tehik.ee/artifactory/gradle-distributions/gradle-5.2.1-bin.zip
distributionUrl=https\://repo.tehik.ee/artifactory/gradle-distributions/gradle-5.6.4-bin.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
......
......@@ -4,6 +4,7 @@ functionalities{
description = """scheduler-service-lib"""
dependencies {
implementation 'javax.persistence:javax.persistence-api:2.2'
}
apply from: this.getClass().getClassLoader().getResource('teis.publishLib.gradle')
......@@ -3,6 +3,7 @@ description = """teis-scheduler-service"""
functionalities {
microservice
database
bpmn
}
apply from: this.getClass().getClassLoader().getResource('teis.integrationTest.gradle')
......@@ -10,22 +11,13 @@ apply from: this.getClass().getClassLoader().getResource('teis.microservice.grad
dependencies {
compile project(':scheduler-service-lib')
// Spring
compile 'org.springframework.boot:spring-boot-starter-web'
compile 'org.springframework.boot:spring-boot-starter-quartz'
compile 'org.springframework.boot:spring-boot-starter-data-jpa'
compile 'org.springframework.boot:spring-boot-starter-amqp'
compile 'org.springframework.boot:spring-boot-starter-actuator'
compile 'org.springframework.boot:spring-boot-starter-validation'
compile 'org.springframework.boot:spring-boot-starter-aop'
// BPM
compile 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:3.2.1'
testImplementation("org.camunda.bpm.extension.mockito:camunda-bpm-mockito:4.10.0")
implementation 'org.springframework.boot:spring-boot-starter-quartz:2.3.4.RELEASE'
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
testAnnotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
integTestImplementation 'org.springframework.boot:spring-boot-starter-quartz:2.3.4.RELEASE'
integTestImplementation 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:3.2.1'
testImplementation "org.camunda.bpm.extension.mockito:camunda-bpm-mockito:4.10.0"
}
// Define the main class for the application
......
......@@ -18,10 +18,10 @@ import org.testcontainers.junit.jupiter.Testcontainers;
@ContextConfiguration(initializers = {SchedulerAppTestBase.Initializer.class})
public abstract class SchedulerAppTestBase {
private static final GenericContainer rabbitMQContainer;
private static final GenericContainer<?> rabbitMQContainer;
static {
rabbitMQContainer = new GenericContainer("rabbitmq:latest").withExposedPorts(5672);
rabbitMQContainer = new GenericContainer<>("rabbitmq:latest").withExposedPorts(5672);
rabbitMQContainer.start();
}
......
......@@ -10,7 +10,6 @@ import ee.sm.ti.teis.servicecommon.config.PropertyLogger;
import org.camunda.bpm.spring.boot.starter.annotation.EnableProcessApplication;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Import;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableScheduling;
......@@ -18,7 +17,6 @@ import org.springframework.scheduling.annotation.EnableScheduling;
@SpringBootApplication
@EnableProcessApplication
@EnableScheduling
@EnableCaching
@EnableRetry
@Import({PropertyLogger.class, ExchangeConfig.class, QueueConfigurator.class, RabbitListenerAspect.class})
public class SchedulerServiceApp {
......
@QueryEntities({AuditedEntity.class})
package ee.sm.ti.teis;
import com.querydsl.core.annotations.QueryEntities;
import ee.sm.ti.teis.servicecommon.common.AuditedEntity;
package ee.sm.ti.teis.scheduler.test;
import ee.sm.ti.teis.servicecommon.util.TestDataImportService;
import lombok.AllArgsConstructor;
import lombok.RequiredArgsConstructor;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.context.annotation.Profile;
import org.springframework.stereotype.Service;
import static ee.sm.ti.teis.servicecommon.util.TestDataImportService.*;
@Service
@RequiredArgsConstructor
@Profile({"dev", "local", "test"})
public class ResetTestDataListener {
private final TestDataImportService testDataImportService;
@RabbitListener(queues = {"scheduler-service" + RESET_TEST_DATA_QUEUE_SUFFIX})
public void resetTestData(String providedMagicString) {
testDataImportService.resetTestData(providedMagicString);
}
}
......@@ -16,5 +16,5 @@ camunda:
admin-user:
id: kermit
password: superSecret
server:
port: 9000
#server:
# port: 9000
......@@ -34,7 +34,7 @@ spring:
parameters:
db_app_username: ${DB_APP_USERNAME:teis}
jpa:
database-platform: org.hibernate.dialect.PostgreSQL82Dialect
database-platform: org.hibernate.dialect.PostgreSQL10Dialect
properties:
hibernate:
jdbc:
......@@ -83,12 +83,15 @@ management:
info.enabled: true
teis:
datasource:
packages-to-scan: ee.sm.ti.teis
system:
name: scheduler-service
test:
data:
resetmagic: ${TEST_DATA_RESET_MAGIC:}
cache: classifierItems
cache:
queues: classifierItems
rabbit:
gw-exchange-name: gw_exchange
gw-exchange-reply-timeout: ${RABBIT_TEMPLATE_GW_EXCHANGE_REPLY_TIMEOUT:6000}
......@@ -101,6 +104,8 @@ teis:
timeout: 1800
retry-count: 5
retry-period: 5s
reset-test-data:
enabled: true
# tasks-defs:
# - id: proceedings.resetNumberSequence
# schedule: * * * * 30 *
......
......@@ -6,16 +6,7 @@
DELETE FROM job_execution WHERE job_definition_id IN ('scheduler.pingTestJob');
DELETE FROM job_definition WHERE id IN ('scheduler.pingTestJob');
INSERT INTO job_definition (id,
name,
schedule_type,
schedule_cron,
schedule_interval,
status,
created_at,
init_needed,
disabled)
VALUES
('scheduler.pingTestJob', 'Tööde käivitamise testimine', 'INTERVAL', NULL, 7200, 'IDLE', NOW(), true, false);
INSERT INTO job_definition (id, name, schedule_type, schedule_cron, schedule_interval, status, created_at, init_needed, disabled)
VALUES ('scheduler.pingTestJob', 'Tööde käivitamise testimine', 'INTERVAL', NULL, 7200, 'IDLE', NOW(), true, false);
UPDATE job_definition SET init_needed=true;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment