diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml index 4621d06..7d6239c 100644 --- a/.github/workflows/maven-publish.yml +++ b/.github/workflows/maven-publish.yml @@ -18,10 +18,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up JDK 17 + - name: Set up JDK 21 uses: actions/setup-java@v2 with: - java-version: '17' + java-version: '21' distribution: 'adopt' server-id: github # Value of the distributionManagement/repository/id field of the pom.xml settings-path: ${{ github.workspace }} # location for the settings.xml file diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml index 536fd13..e47b998 100644 --- a/.github/workflows/maven-verify.yml +++ b/.github/workflows/maven-verify.yml @@ -24,9 +24,9 @@ jobs: # restore-keys: | # ${{ runner.os }}-maven- - uses: actions/setup-java@v2 - name: Set up JDK 17 + name: Set up JDK 21 with: - java-version: '17' + java-version: '21' distribution: 'adopt' # - name: Set up Apache Maven Central # uses: actions/setup-java@v2 diff --git a/README.md b/README.md index 942aa8e..4276dd8 100644 --- a/README.md +++ b/README.md @@ -88,7 +88,7 @@ The following are the initially required software pieces: 2. **Git**: it can be downloaded and installed from https://git-scm.com/downloads. -3. **Java 17 EA**: it can be downloaded and installed from https://jdk.java.net/17/. +3. **Java 21 EA**: it can be downloaded and installed from https://jdk.java.net/21/. 4. **Spring Boot Initializer**: This *Initializer* generates *spring* boot project with just what you need to start quickly! Start from here https://start.spring.io/. diff --git a/TESTCONTAINERS.md b/TESTCONTAINERS.md index 9193e88..068af1f 100644 --- a/TESTCONTAINERS.md +++ b/TESTCONTAINERS.md @@ -126,18 +126,18 @@ As long as we have TestContainers and the appropriate JDBC driver on your classp - For Spring Boot (Before version 2.3.0) you need to specify the driver manually `spring.datasource.driver-class-name=org.testcontainers.jdbc.ContainerDatabaseDriver` -Original URL: `jdbc:mysql:5.7://somehostname:someport/databasename` +Original URL: `jdbc:mysql:8.0://somehostname:someport/databasename` Insert `tc:` after `jdbc:` as follows. Note that the hostname, port and database name will be ignored; you can leave these as-is or set them to any value. -TestContainers URL with a specific version: `jdbc:tc:mysql:5.7:///databasename` +TestContainers URL with a specific version: `jdbc:tc:mysql:8.0:///databasename` For multiple databases testing we can use different profiles: # application-mysql.yaml spring: datasource: - url: jdbc:tc:mysql:5.7://localhost:3306/dbs + url: jdbc:tc:mysql:8.0://localhost:3306/dbs username: root password: root driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver @@ -155,19 +155,19 @@ For multiple databases testing we can use different profiles: ##### Using a classpath init script Testcontainers can run an init script after the database container is started, but before your code is given a connection to it. The script must be on the classpath, and is referenced as follows: -`jdbc:tc:mysql:5.7.22:///databasename?TC_INITSCRIPT=somepath/init_mysql.sql` +`jdbc:tc:mysql:8.0.22:///databasename?TC_INITSCRIPT=somepath/init_mysql.sql` This is useful if you have a fixed script for setting up database schema, etc. ##### Using an init script from a file If the init script path is prefixed file:, it will be loaded from a file (relative to the working directory, which will usually be the project root). -`jdbc:tc:mysql:5.7.22:///databasename?TC_INITSCRIPT=file:src/main/resources/init_mysql.sql` +`jdbc:tc:mysql:8.0.22:///databasename?TC_INITSCRIPT=file:src/main/resources/init_mysql.sql` ##### Using an init function Instead of running a fixed script for DB setup, it may be useful to call a Java function that you define. This is intended to allow you to trigger database schema migration tools. To do this, add TC_INITFUNCTION to the URL as follows, passing a full path to the class name and method: -`jdbc:tc:mysql:5.7.22:///databasename?TC_INITFUNCTION=org.testcontainers.jdbc.JDBCDriverTest::sampleInitFunction` +`jdbc:tc:mysql:8.0:///databasename?TC_INITFUNCTION=org.testcontainers.jdbc.JDBCDriverTest::sampleInitFunction` The init function must be a public static method which takes a java.sql.Connection as its only parameter, e.g. @@ -180,7 +180,7 @@ The init function must be a public static method which takes a java.sql.Connecti ##### Running container in daemon mode By default database container is being stopped as soon as last connection is closed. There are cases when you might need to start container and keep it running till you stop it explicitly or JVM is shutdown. To do this, add TC_DAEMON parameter to the URL as follows: -`jdbc:tc:mysql:5.7.22:///databasename?TC_DAEMON=true` +`jdbc:tc:mysql:8.0:///databasename?TC_DAEMON=true` With this parameter database container will keep running even when there're no open connections. @@ -202,14 +202,14 @@ More info: https://www.testcontainers.org/modules/databases/jdbc/ For MySQL databases, it is possible to override configuration settings using resources on the classpath. Assuming `db/mysql_conf_override` is a directory on the classpath containing `.cnf` files, the following URL can be used: -`jdbc:tc:mysql:5.7:///databasename?TC_MY_CNF=db/mysql_conf_override` +`jdbc:tc:mysql:8.0:///databasename?TC_MY_CNF=db/mysql_conf_override` ##### Database container objects In case you can't use the URL support, or need to fine-tune the container, you can instantiate it yourself. Add a `@Rule` or `@ClassRule` to your test class, e.g.: @ClassRule - public static MySQLContainer mysqlSQLContainer = new MySQLContainer("mysql:5.7"); + public static MySQLContainer mysqlSQLContainer = new MySQLContainer("mysql:8.0"); static class Initializer implements ApplicationContextInitializer { diff --git a/api/pom.xml b/api/pom.xml index 3222665..a1a6337 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -6,14 +6,14 @@ com.backbase.buildingblocks backbase-openapi-spec-starter-parent - 16.0.1 + 17.0.0 com.backbase.goldensample api pom - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT product-api @@ -24,7 +24,7 @@ 1.12.1 - 0.17.24 + 0.17.32 diff --git a/api/product-api/pom.xml b/api/product-api/pom.xml index ac66882..13f3e57 100644 --- a/api/product-api/pom.xml +++ b/api/product-api/pom.xml @@ -6,7 +6,7 @@ com.backbase.goldensample api - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT Backbase :: product-api diff --git a/api/review-service-api/pom.xml b/api/review-service-api/pom.xml index cf1a53a..c2c091f 100644 --- a/api/review-service-api/pom.xml +++ b/api/review-service-api/pom.xml @@ -6,7 +6,7 @@ com.backbase.goldensample api - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT Backbase :: review-service-api diff --git a/api/store-client-api/pom.xml b/api/store-client-api/pom.xml index 0ce26de..052b99d 100644 --- a/api/store-client-api/pom.xml +++ b/api/store-client-api/pom.xml @@ -6,7 +6,7 @@ com.backbase.goldensample api - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT Backbase :: store-client-api diff --git a/api/store-integration-enricher-api/pom.xml b/api/store-integration-enricher-api/pom.xml index cf38c90..8a1667f 100644 --- a/api/store-integration-enricher-api/pom.xml +++ b/api/store-integration-enricher-api/pom.xml @@ -6,7 +6,7 @@ com.backbase.goldensample api - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT Backbase :: store-integration-enricher-api diff --git a/charts/pom.xml b/charts/pom.xml index 449b50a..f11808d 100644 --- a/charts/pom.xml +++ b/charts/pom.xml @@ -6,11 +6,11 @@ com.backbase.goldensample backbase-golden-sample - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT charts - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT backbase-golden-sample-chart Demo project for Backbase Backend Best Practices pom diff --git a/database/pom.xml b/database/pom.xml index ba696c9..d44cd4c 100644 --- a/database/pom.xml +++ b/database/pom.xml @@ -6,7 +6,7 @@ com.backbase.goldensample backbase-golden-sample - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT database diff --git a/database/product-db/pom.xml b/database/product-db/pom.xml index 9d33089..5a7d25c 100644 --- a/database/product-db/pom.xml +++ b/database/product-db/pom.xml @@ -7,7 +7,7 @@ com.backbase.goldensample database - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT product-db diff --git a/database/review-db/pom.xml b/database/review-db/pom.xml index bf0dfeb..e46c75e 100644 --- a/database/review-db/pom.xml +++ b/database/review-db/pom.xml @@ -7,7 +7,7 @@ com.backbase.goldensample database - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT review-db diff --git a/docker-compose.yaml b/docker-compose.yaml index 4f6dcad..8f1129a 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -52,7 +52,7 @@ services: - "61614:61614" mysql: - image: mysql:5.7.18 + image: mysql:8.0 # Set max_allowed_packet to 512M for provisioning command: --max-allowed-packet=512M --performance-schema=FALSE --transaction-isolation=READ-COMMITTED --init-connect='SET collation_connection=utf8_bin' --init-connect='SET NAMES utf8;' --character-set-server=utf8 --collation-server=utf8_bin --lower-case-table-names=2 --max-connections=500 container_name: demo_mysql diff --git a/pom.xml b/pom.xml index 52de468..104af31 100644 --- a/pom.xml +++ b/pom.xml @@ -10,13 +10,13 @@ service-sdk-starter-core com.backbase.buildingblocks - 16.0.1 + 17.0.0 com.backbase.goldensample backbase-golden-sample - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT backbase-golden-example Demo project for Backbase Backend Best Practices pom diff --git a/services/pom.xml b/services/pom.xml index f647c6c..7e191ad 100644 --- a/services/pom.xml +++ b/services/pom.xml @@ -5,11 +5,11 @@ com.backbase.goldensample backbase-golden-sample - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT services - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT pom @@ -20,8 +20,8 @@ 1.0.0 - 1.19.1 - 0.17.24 + 1.19.7 + 0.17.32 3.14.1 experimental/golden-sample diff --git a/services/product/pom.xml b/services/product/pom.xml index 4f3397c..7acf270 100644 --- a/services/product/pom.xml +++ b/services/product/pom.xml @@ -5,11 +5,11 @@ com.backbase.goldensample services - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT product - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT jar Backbase :: product-service diff --git a/services/product/src/test/resources/application-m10y.yaml b/services/product/src/test/resources/application-m10y.yaml index a21228b..12642a7 100644 --- a/services/product/src/test/resources/application-m10y.yaml +++ b/services/product/src/test/resources/application-m10y.yaml @@ -4,12 +4,12 @@ backbase: tenants: - id: org_shop datasource: - url: jdbc:tc:mysql:5.7:///testdb1?TC_MY_CNF=db/mysql_conf_override + url: jdbc:tc:mysql:8.0:///testdb1?TC_MY_CNF=db/mysql_conf_override username: test password: test - id: rebrand_shop datasource: - url: jdbc:tc:mysql:5.7:///testdb2?TC_MY_CNF=db/mysql_conf_override + url: jdbc:tc:mysql:8.0:///testdb2?TC_MY_CNF=db/mysql_conf_override username: test password: test datasource: diff --git a/services/product/src/test/resources/application.yaml b/services/product/src/test/resources/application.yaml index cfbf360..babf9aa 100644 --- a/services/product/src/test/resources/application.yaml +++ b/services/product/src/test/resources/application.yaml @@ -13,8 +13,8 @@ spring: # ## since Spring Boot can deduce it for most databases from the url. driver-class-name: org.testcontainers.jdbc.ContainerDatabaseDriver # Useful if we want to load the Database with a lot of data before the test kick in (disable liquibase first) -# url: jdbc:tc:mysql:5.7:///test?TC_INITSCRIPT=file:src/test/resources/product-10k-rows.sql - url: jdbc:tc:mysql:5.7:///test?TC_MY_CNF=db/mysql_conf_override +# url: jdbc:tc:mysql:8.0:///test?TC_INITSCRIPT=file:src/test/resources/product-10k-rows.sql + url: jdbc:tc:mysql:8.0:///test?TC_MY_CNF=db/mysql_conf_override username: test password: test diff --git a/services/review/pom.xml b/services/review/pom.xml index 89b6269..a0472fa 100644 --- a/services/review/pom.xml +++ b/services/review/pom.xml @@ -5,11 +5,11 @@ com.backbase.goldensample services - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT review - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT jar Backbase :: review-service diff --git a/services/review/src/test/resources/application-m10y.yaml b/services/review/src/test/resources/application-m10y.yaml index 3c94933..bffd79f 100644 --- a/services/review/src/test/resources/application-m10y.yaml +++ b/services/review/src/test/resources/application-m10y.yaml @@ -4,12 +4,12 @@ backbase: tenants: - id: org_shop datasource: - url: jdbc:tc:mysql:5.7:///testdb1?TC_MY_CNF=db/mysql_conf_override + url: jdbc:tc:mysql:8.0:///testdb1?TC_MY_CNF=db/mysql_conf_override username: test password: test - id: rebrand_shop datasource: - url: jdbc:tc:mysql:5.7:///testdb2?TC_MY_CNF=db/mysql_conf_override + url: jdbc:tc:mysql:8.0:///testdb2?TC_MY_CNF=db/mysql_conf_override username: test password: test datasource: diff --git a/services/review/src/test/resources/application.yaml b/services/review/src/test/resources/application.yaml index ef0edd0..487025e 100644 --- a/services/review/src/test/resources/application.yaml +++ b/services/review/src/test/resources/application.yaml @@ -11,7 +11,7 @@ spring: datasource: ## You often do not need to specify the driver-class-name, ## since Spring Boot can deduce it for most databases from the url. - url: jdbc:tc:mysql:5.7:///databasename?TC_MY_CNF=db/mysql_conf_override + url: jdbc:tc:mysql:8.0:///databasename?TC_MY_CNF=db/mysql_conf_override username: test password: test diff --git a/services/store/pom.xml b/services/store/pom.xml index f2b3125..58a4f50 100644 --- a/services/store/pom.xml +++ b/services/store/pom.xml @@ -5,11 +5,11 @@ com.backbase.goldensample services - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT store - 2.0.0-SNAPSHOT + 3.0.0-SNAPSHOT jar Backbase :: store-service