Skip to content

Commit 1584050

Browse files
authored
Java 21, SB 3.3.0, version upgrades for Cloudbank (#896)
* Java 21, SB 3.3.0, version upgrades
1 parent 042263a commit 1584050

File tree

13 files changed

+61
-32
lines changed

13 files changed

+61
-32
lines changed

cloudbank-v32/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
**NOTE:** This document and application is WIP.
44

5-
To run Cloud Bank you need OBaaS version 1.1.3 [Oracle Backend for Spring Boot and Microservices](https://cloudmarketplace.oracle.com/marketplace/en_US/listing/138899911)
5+
To run Cloud Bank you need OBaaS version 1.2.0 [Oracle Backend for Spring Boot and Microservices](https://cloudmarketplace.oracle.com/marketplace/en_US/listing/138899911) and Java 21 installed.
66

77
## Build CloudBank
88

@@ -215,7 +215,7 @@ This is an example of the `customer32` application:
215215
kubectl -n ingress-nginx get service ingress-nginx-controller
216216
```
217217
218-
Result. Make a note of the EXTERNAL-IP it will be used in the tests.
218+
Result. Create a variable called IP with the value of the EXTERNAL-IP it will be used in the tests.
219219
220220
```text
221221
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
@@ -227,7 +227,7 @@ This is an example of the `customer32` application:
227227
1. Rest endpoint
228228
229229
```shell
230-
curl -s http://<EXTERNAL-IP>/api/v1/accounts | jq
230+
curl -s http://$IP/api/v1/accounts | jq
231231
```
232232
233233
Should return:
@@ -252,7 +252,7 @@ This is an example of the `customer32` application:
252252
1. REST endpoint
253253
254254
```shell
255-
curl -s http://<EXTERNAL-IP>/api/v1/customer | jq
255+
curl -s http://$IP/api/v1/customer | jq
256256
```
257257
258258
Should return:
@@ -276,7 +276,7 @@ This is an example of the `customer32` application:
276276
1. REST endpoint
277277
278278
```shell
279-
curl -s http://<EXTERNAL-IP>/api/v1/creditscore | jq
279+
curl -s http://$IP/api/v1/creditscore | jq
280280
```
281281
282282
Should return:
@@ -293,7 +293,7 @@ This is an example of the `customer32` application:
293293
1. REST endpoint - deposit check. *NOTE*: Make sure you use an existing account number
294294
295295
```shell
296-
curl -i -X POST -H 'Content-Type: application/json' -d '{"accountId": 1, "amount": 256}' http://<EXTERNAL-IP>/api/v1/testrunner/deposit
296+
curl -i -X POST -H 'Content-Type: application/json' -d '{"accountId": 1, "amount": 256}' http://$IP/api/v1/testrunner/deposit
297297
```
298298
299299
Should return:
@@ -322,7 +322,7 @@ This is an example of the `customer32` application:
322322
1. Check journal entries. Replace '1' with the account number you used.
323323
324324
```shell
325-
curl -i http://<EXTERNAL-ID>/api/v1/account/1/journal
325+
curl -i http://$IP/api/v1/account/1/journal
326326
```
327327
328328
output should be similar to:
@@ -339,7 +339,7 @@ This is an example of the `customer32` application:
339339
1. Clearance of check - Note the JournalID from earlier step
340340
341341
```shell
342-
curl -i -X POST -H 'Content-Type: application/json' -d '{"journalId": 1}' http://<EXTERNAL-ID>/api/v1/testrunner/clear
342+
curl -i -X POST -H 'Content-Type: application/json' -d '{"journalId": 1}' http://$IP/api/v1/testrunner/clear
343343
```
344344
345345
output should be similar to:
@@ -370,7 +370,7 @@ This is an example of the `customer32` application:
370370
1. Check journal -- DEPOSIT
371371
372372
```shell
373-
curl -i http://<EXTERNAL-IP>/api/v1/account/1/journal
373+
curl -i http://$IP/api/v1/account/1/journal
374374
```
375375
376376
Output should look like this -- DEPOSIT
@@ -389,7 +389,7 @@ This is an example of the `customer32` application:
389389
1. Check account balances. Note that the account numbers 1 and 2 can be different in your environment
390390
391391
```shell
392-
curl -s http://<EXTERNAL-IP>/api/v1/account/1 | jq ; curl -s http://<EXTERNAL-IP>/api/v1/account/2 | jq
392+
curl -s http://$IP/api/v1/account/1 | jq ; curl -s http://$IP/api/v1/account/2 | jq
393393
```
394394
395395
Output should be similar to this, make a note of the account balance:
@@ -418,7 +418,7 @@ This is an example of the `customer32` application:
418418
1. Perform transfer between two accounts. Note account numbers
419419
420420
```shell
421-
curl -X POST "http://<EXTERNAL-IP>/transfer?fromAccount=2&toAccount=1&amount=100"
421+
curl -X POST "http://$IP/transfer?fromAccount=2&toAccount=1&amount=100"
422422
```
423423
424424
Output should look like this:
@@ -430,7 +430,7 @@ This is an example of the `customer32` application:
430430
1. Check accounts to see that the transfer have occurred
431431
432432
```shell
433-
curl -s http://<EXTERNAL-IP>/api/v1/account/1 | jq ; curl -s http://<EXTERNAL-IP>/api/v1/account/2 | jq
433+
curl -s http://$IP/api/v1/account/1 | jq ; curl -s http://$IP/api/v1/account/2 | jq
434434
```
435435
436436
Output should be similar to this:
@@ -515,6 +515,6 @@ This is an example of the `customer32` application:
515515
kubectl -n grafana port-forward svc/grafana 7070:80
516516
```
517517
518-
1. Open <http://localhost:7070> in a browser and verify that all services are registered and you can see some data (you may have to select the dashboard you want to see)
518+
1. Open <http://localhost:7070/grafana/> in a browser and verify that all services are registered and you can see some data (you may have to select the dashboard you want to see)
519519
520520
![Grafana](images/grafana-dashboard.png " ")

cloudbank-v32/account/src/main/resources/application.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
spring:
55
application:
66
name: account
7-
# jersey:
8-
# type: filter
7+
threads:
8+
virtual:
9+
enabled: true
910
jpa:
1011
hibernate:
1112
ddl-auto: validate

cloudbank-v32/checks/src/main/resources/application.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
spring:
55
application:
66
name: checks
7-
7+
threads:
8+
virtual:
9+
enabled: true
810
datasource:
911
url: ${spring.datasource.url}
1012
username: ${spring.datasource.username}

cloudbank-v32/creditscore/src/main/resources/application.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
spring:
55
application:
66
name: creditscore
7-
7+
threads:
8+
virtual:
9+
enabled: true
810
# Disables autoconfiguration for the refresh scope and associated features.
911
cloud:
1012
refresh:

cloudbank-v32/customer/src/main/resources/application.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
spring:
44
application:
55
name: customer
6+
threads:
7+
virtual:
8+
enabled: true
69
jpa:
710
hibernate:
811
ddl-auto: validate

cloudbank-v32/customer32-mongo/src/main/resources/application.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,7 @@ spring:
1111
data:
1212
mongodb:
1313
uri: 'mongodb://USER:PASSWORD@HOSTNAME-MONGO1.adb.us-phoenix-1.oraclecloudapps.com:27017/USER?authMechanism=PLAIN&authSource=$external&ssl=true&retryWrites=false&loadBalanced=true'
14-
database: 'USER'
14+
database: 'USER'
15+
threads:
16+
virtual:
17+
enabled: true

cloudbank-v32/customer32/src/main/resources/application.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
spring:
55
application:
66
name: customer32
7-
7+
threads:
8+
virtual:
9+
enabled: true
810
liquibase:
911
change-log: classpath:db/changelog/controller.yaml
1012
url: ${spring.datasource.url}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
deploy --service-name account --artifact-path account/target/account-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
2+
deploy --service-name checks --artifact-path checks/target/checks-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
3+
deploy --service-name customer --artifact-path customer/target/customer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
4+
deploy --service-name creditscore --artifact-path creditscore/target/creditscore-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
5+
deploy --service-name testrunner --artifact-path testrunner/target/testrunner-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
6+
deploy --service-name transfer --artifact-path transfer/target/transfer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
bind --service-name account
2+
bind --service-name checks --username account
3+
bind --service-name customer
4+
bind --service-name testrunner --username account
5+
deploy --service-name account --artifact-path account/target/account-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
6+
deploy --service-name checks --artifact-path checks/target/checks-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
7+
deploy --service-name customer --artifact-path customer/target/customer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --liquibase-db admin --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
8+
deploy --service-name creditscore --artifact-path creditscore/target/creditscore-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
9+
deploy --service-name testrunner --artifact-path testrunner/target/testrunner-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21
10+
deploy --service-name transfer --artifact-path transfer/target/transfer-0.0.1-SNAPSHOT.jar --image-version 0.0.1 --java-version ghcr.io/oracle/graalvm-native-image-obaas:21

cloudbank-v32/pom.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<parent>
99
<groupId>org.springframework.boot</groupId>
1010
<artifactId>spring-boot-starter-parent</artifactId>
11-
<version>3.2.4</version>
11+
<version>3.3.0</version>
1212
<relativePath/> <!-- lookup parent from repository -->
1313
</parent>
1414

@@ -32,15 +32,15 @@
3232

3333
<properties>
3434
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
35-
<java.version>17</java.version>
36-
<spring-cloud.version>2023.0.0</spring-cloud.version>
35+
<java.version>21</java.version>
36+
<spring-cloud.version>2023.0.1</spring-cloud.version>
3737
<org.springdoc-version>2.4.0</org.springdoc-version>
3838

39-
<micrometer-core.version>1.12.4</micrometer-core.version>
40-
<lombok.version>1.18.30</lombok.version>
39+
<micrometer-core.version>1.13.0</micrometer-core.version>
40+
<lombok.version>1.18.32</lombok.version>
4141
<oracle-springboot-starter.version>23.4.0</oracle-springboot-starter.version>
42-
<oracle-microtx-starter.version>23.4.1</oracle-microtx-starter.version>
43-
<liquibase.version>4.26.0</liquibase.version>
42+
<oracle-microtx-starter.version>23.4.2</oracle-microtx-starter.version>
43+
<liquibase.version>4.28.0</liquibase.version>
4444
<datasource-micrometer-spring-boot.version>1.0.3</datasource-micrometer-spring-boot.version>
4545

4646
<!-- Code quality tools -->

0 commit comments

Comments
 (0)