Skip to content

Commit 0ae2130

Browse files
authored
Merge pull request #63 from Backbase/BEFOUND-1032_service-to-service-communication
upgrade service-to-service-communication to ssdk 16
2 parents edba94f + 0bf5947 commit 0ae2130

File tree

6 files changed

+18
-37
lines changed

6 files changed

+18
-37
lines changed

service-sdk/16.0.0/service-to-service-communication/example-service-to-service/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ To run the service in development mode, use:
1616
- `mvn spring-boot:run`
1717

1818
To run the service from the built binaries, use:
19-
- `java -jar target/example-service-to-service-1.0.0-SNAPSHOT.war`
19+
- `java -jar target/example-service-to-service-1.0.0-SNAPSHOT.jar`
2020

2121
## Authorization
2222

23-
Requests to this service are authorized with a Backbase Internal JWT, therefore you must access this service via the Backbase Gateway after authenticating with the authentication service.
23+
Requests to this service are authorized with a Backbase Internal JWT, therefore you must access this service via the Backbase Edge after authenticating with Identity service.
2424

2525
For local development, an internal JWT can be created from http://jwt.io, entering ```JWTSecretKeyDontUseInProduction!``` as the secret in the signature to generate a valid signed JWT.

service-sdk/16.0.0/service-to-service-communication/example-service-to-service/pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,25 +9,25 @@
99
<parent>
1010
<artifactId>service-sdk-starter-core</artifactId>
1111
<groupId>com.backbase.buildingblocks</groupId>
12-
<version>15.0.1</version>
12+
<version>16.0.0</version>
1313
<relativePath />
1414
</parent>
1515

1616
<groupId>com.backbase.example</groupId>
1717
<artifactId>example-service-to-service</artifactId>
1818
<version>1.0.0-SNAPSHOT</version>
19-
<packaging>war</packaging>
2019
<name>Backbase :: Digital Banking Services :: example-service-to-service</name>
2120

2221
<properties>
2322
<java.version>17</java.version>
2423
<jsr305.version>3.0.2</jsr305.version>
25-
<boat-maven-plugin.version>0.16.2</boat-maven-plugin.version>
24+
<boat-maven-plugin.version>0.17.5</boat-maven-plugin.version>
25+
<archunit.skip>true</archunit.skip>
2626
</properties>
2727

2828
<dependencies>
2929
<dependency>
30-
<groupId>io.swagger</groupId>
30+
<groupId>io.swagger.core.v3</groupId>
3131
<artifactId>swagger-annotations</artifactId>
3232
</dependency>
3333
<dependency>
@@ -93,8 +93,8 @@
9393
</dependency>
9494
<!-- Required for MySql -->
9595
<dependency>
96-
<groupId>mysql</groupId>
97-
<artifactId>mysql-connector-java</artifactId>
96+
<groupId>com.mysql</groupId>
97+
<artifactId>mysql-connector-j</artifactId>
9898
<scope>test</scope>
9999
</dependency>
100100

service-sdk/16.0.0/service-to-service-communication/example-service-to-service/src/main/java/com/backbase/example/domain/Greeting.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.backbase.example.domain;
22

3-
import javax.persistence.*;
3+
import jakarta.persistence.*;
44

55
@Entity
66
@Table(name = "greetings")

service-sdk/16.0.0/service-to-service-communication/example-service-to-service/src/main/java/com/backbase/example/service/GreetingsServiceImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import com.backbase.integration.example.client.v1.MessageApi;
77
import org.springframework.beans.factory.annotation.Autowired;
88
import org.springframework.stereotype.Service;
9+
import org.springframework.transaction.annotation.Transactional;
910

1011
import java.util.List;
1112

@@ -19,18 +20,21 @@ public class GreetingsServiceImpl implements GreetingsService {
1920
private MessageApi exampleIntegrationApiClient;
2021

2122
@Override
23+
@Transactional(readOnly = true)
2224
public List<Greeting> getGreetings() {
2325
return greetingsRepository.findAll();
2426
}
2527

2628
// tag::getExternalGreetings[]
2729
@Override
30+
@Transactional(readOnly = true)
2831
public List<Greeting> getExternalGreetings() {
2932
return GreetingsMapper.INSTANCE.integrationMessageToGreeting(exampleIntegrationApiClient.getMessages());
3033
}
3134
// end::getExternalGreetings[]
3235

3336
@Override
37+
@Transactional(readOnly = true)
3438
public Greeting getGreetingById(String id) {
3539
return greetingsRepository.findById(id).get();
3640
}

service-sdk/16.0.0/service-to-service-communication/example-service-to-service/src/main/resources/application.yaml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ eureka:
99
role: live
1010
client:
1111
serviceUrl:
12-
defaultZone: http://localhost:8764/registry/eureka/
12+
defaultZone: http://localhost:8761/eureka/
1313

1414
# Configure Internal JWT handler
1515
sso:
@@ -41,8 +41,10 @@ spring:
4141
enabled: true
4242
datasource:
4343
url: jdbc:h2:mem:greetingsdb;Mode=Oracle
44-
platform: h2
45-
continue-on-error: true
44+
sql:
45+
init:
46+
platform: h2
47+
continue-on-error: true
4648
jpa:
4749
generate-ddl: false
4850
liquibase:

service-sdk/16.0.0/service-to-service-communication/example-service-to-service/src/main/webapp/WEB-INF/jboss-deployment-structure.xml

Lines changed: 0 additions & 25 deletions
This file was deleted.

0 commit comments

Comments
 (0)