Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
upgrade ssdk 16 (#18)
Browse files Browse the repository at this point in the history
* upgrade ssdk 16

* upgrade ssdk 16

* upgrade ssdk 16

* upgrade ssdk 16
  • Loading branch information
afsinka-backbase authored Feb 26, 2024
1 parent b0720b2 commit f588431
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 21 deletions.
21 changes: 21 additions & 0 deletions application-local.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
server:
port: 8081

spring:
activemq:
broker-url: tcp://localhost:61616
user: admin
password: admin

backbase:
event-emitter:
#comma-separated list topic names
topic-names: com.backbase.dbs.messages.pandp.event.spec.v4.MessageReceivedEvent

logging:
level:
com:
backbase: DEBUG
org:
springframework:
cloud: DEBUG
50 changes: 34 additions & 16 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,17 @@
<parent>
<groupId>com.backbase.buildingblocks</groupId>
<artifactId>service-sdk-starter-core</artifactId>
<version>15.1.0</version>
<version>16.1.5</version>
</parent>

<groupId>com.backbase.testing</groupId>
<artifactId>event-emitter</artifactId>
<version>1.6.1-SNAPSHOT</version>
<packaging>war</packaging>
<version>1.7.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Backbase :: Testing Components :: Events Emitter</name>

<properties>
<archunit.skip>true</archunit.skip>
<action-service.version>1.1.5</action-service.version>

<!--EVENTS-->
Expand All @@ -25,7 +26,7 @@
<payment-order-service.version>1.3.92</payment-order-service.version>
<contact-manager.version>2.0.6</contact-manager.version>
<pocket-tailor.version>0.5</pocket-tailor.version>
<audit-spec-version>1.0.47</audit-spec-version>
<audit-spec.version>7.0.0</audit-spec.version>

<java.version>17</java.version>
<api.target>${project.build.directory}/downloaded-api</api.target>
Expand All @@ -42,10 +43,12 @@
<apache-commons-beanutils.version>1.9.4</apache-commons-beanutils.version>
<hamcrest-date.version>2.0.7</hamcrest-date.version>
<dbunit.version>2.6.0</dbunit.version>
<boat.version>0.14.0</boat.version>
<swagger-annotations.version>1.6.2</swagger-annotations.version>
<boat.version>0.17.20</boat.version>
<swagger-core-annotations.version>2.2.15</swagger-core-annotations.version>
<jackson-databind-nullable.version>0.2.1</jackson-databind-nullable.version>
<wagon.plugin.version>2.0.0</wagon.plugin.version>
<testcontainers.version>1.17.6</testcontainers.version>
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>

<sonar.jacoco.reportPaths>target/coverage-reports/jacoco.exec,target/coverage-reports/jacoco-it.exec</sonar.jacoco.reportPaths>
<sonar.sources>src/main/java,pom.xml</sonar.sources>
Expand All @@ -64,7 +67,7 @@
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>testcontainers-bom</artifactId>
<version>1.17.5</version>
<version>${testcontainers.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -76,6 +79,10 @@
<groupId>com.backbase.buildingblocks</groupId>
<artifactId>events</artifactId>
</dependency>
<dependency>
<groupId>com.backbase.buildingblocks</groupId>
<artifactId>spring-cloud-stream-binder-jms-activemq</artifactId>
</dependency>
<dependency>
<groupId>com.backbase.buildingblocks</groupId>
<artifactId>api</artifactId>
Expand Down Expand Up @@ -121,9 +128,9 @@
<artifactId>guava</artifactId>
</dependency>
<dependency>
<groupId>io.swagger</groupId>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-annotations</artifactId>
<version>${swagger-annotations.version}</version>
<version>${swagger-core-annotations.version}</version>
</dependency>
<dependency>
<groupId>org.openapitools</groupId>
Expand All @@ -148,6 +155,10 @@
<artifactId>mapstruct-processor</artifactId>
<version>${mapstruct.version}</version>
</dependency>
<dependency>
<groupId>jakarta.annotation</groupId>
<artifactId>jakarta.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
Expand All @@ -160,7 +171,6 @@
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -220,6 +230,11 @@
<artifactId>service-sdk-starter-mapping</artifactId>
<version>${project.parent.version}</version>
</path>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok-mapstruct-binding</artifactId>
<version>${lombok-mapstruct-binding.version}</version>
</dependency>
</annotationProcessorPaths>
<compilerArgs>
<compilerArg>-Amapstruct.unmappedTargetPolicy=ERROR</compilerArg>
Expand Down Expand Up @@ -319,9 +334,11 @@
<artifactItem>
<groupId>com.backbase.dbs.audit</groupId>
<artifactId>audit-spec</artifactId>
<type>jar</type>
<version>${audit-spec-version}</version>
<outputDirectory>target/unpacked-specs/audit-spec</outputDirectory>
<version>${audit-spec.version}</version>
<type>zip</type>
<classifier>events</classifier>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/unpacked-specs/audit-spec/events</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
Expand Down Expand Up @@ -437,16 +454,17 @@
</configuration>
</execution>
<execution>
<id>audit-events</id>
<id>audit-spec</id>
<phase>generate-sources</phase>
<goals>
<goal>events-generation</goal>
</goals>
<configuration>
<inputFile>target/unpacked-specs/audit-spec/events/</inputFile>
<outputFile>target/generated-sources/</outputFile>
<inputFile>target/unpacked-specs/audit-spec/events</inputFile>
<packageName>audit.persistence</packageName>
<packageVersion>1</packageVersion>
<packageName>audit.persistence</packageName>
<groupNameStrategy>APP_NAME</groupNameStrategy>
</configuration>
</execution>
</executions>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.backbase.eo.testing.events.emitter;

import com.backbase.buildingblocks.backend.communication.context.OriginatorContext;
import com.backbase.buildingblocks.backend.communication.event.EnvelopedEvent;
import com.backbase.buildingblocks.backend.communication.event.EnvelopedEvent;
import com.backbase.buildingblocks.backend.communication.event.proxy.EventBus;
import com.backbase.buildingblocks.persistence.model.Event;
import com.backbase.buildingblocks.presentation.errors.BadRequestException;
Expand All @@ -19,7 +19,7 @@
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import javax.annotation.Nullable;
import jakarta.annotation.Nullable;

import lombok.RequiredArgsConstructor;
import org.reflections.Reflections;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletRequest;
import java.time.Instant;
import java.util.Collections;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.backbase.eo.testing.events.EventEmitter;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectWriter;
import lombok.extern.slf4j.Slf4j;
import org.junit.ClassRule;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.DisplayName;
Expand All @@ -35,6 +36,7 @@
import java.util.Collections;
import java.util.Map;
import java.util.UUID;
import org.testcontainers.containers.output.Slf4jLogConsumer;

/**
* {@link EventEmitterIT}
Expand All @@ -49,6 +51,7 @@
@ActiveProfiles({"default", "it"})
@SpringBootTest(classes = {EventEmitter.class, TestEventConsumerConfiguration.class})
@ContextConfiguration(classes = {EventEmitter.class, TestEventConsumerConfiguration.class}, initializers = {EventEmitterIT.Initializer.class})
@Slf4j
class EventEmitterIT {

@Autowired
Expand All @@ -62,7 +65,8 @@ class EventEmitterIT {
@ClassRule
public static DockerComposeContainer environment = new DockerComposeContainer(
new File("src/test/resources/docker-compose.yml"))
.withExposedService("message-broker", 61616);
.withExposedService("message-broker", 61616)
.withLogConsumer("message-broker", new Slf4jLogConsumer(log));

@BeforeAll
public static void envSetup() {
Expand All @@ -82,7 +86,7 @@ public void initialize(ConfigurableApplicationContext configurableApplicationCon
"spring.event-emitter.topic-names=" + EVENT_DESTINATION,
"spring.cloud.stream.bindings.consumeTestEvent-in-0.group=event-emitter",
"spring.cloud.stream.bindings.consumeTestEvent-in-0.destination=" + EVENT_DESTINATION,
"spring.cloud.stream.function.definition=consumeTestEvent",
"spring.cloud.function.definition=consumeTestEvent",
"backbase.event-emitter.custom-header-pairs[0].http=x-lob",
"backbase.event-emitter.custom-header-pairs[0].event=bbLineOfBusiness",
"backbase.event-emitter.custom-header-pairs[1].http=customerCategory",
Expand Down
9 changes: 9 additions & 0 deletions src/test/resources/application-it.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
spring:
main:
cloud-platform: NONE

logging:
level:
root: INFO
com:
backbase: DEBUG

0 comments on commit f588431

Please sign in to comment.