Updated db containers, and dependencies

This commit is contained in:
Patrick Baumgartner 2024-09-28 08:58:17 +02:00 committed by Dave Syer
parent 2daa3993ee
commit 6fffe61b93
6 changed files with 17 additions and 15 deletions

View file

@ -1,10 +1,10 @@
plugins { plugins {
id 'java' id 'java'
id 'org.springframework.boot' version '3.3.4' id 'org.springframework.boot' version '3.3.4'
id 'io.spring.dependency-management' version '1.1.5' id 'io.spring.dependency-management' version '1.1.6'
id 'org.graalvm.buildtools.native' version '0.10.2' id 'org.graalvm.buildtools.native' version '0.10.3'
id 'org.cyclonedx.bom' version '1.8.2' id 'org.cyclonedx.bom' version '1.10.0'
id 'io.spring.javaformat' version '0.0.41' id 'io.spring.javaformat' version '0.0.43'
id "io.spring.nohttp" version "0.0.11" id "io.spring.nohttp" version "0.0.11"
} }
@ -25,6 +25,8 @@ repositories {
mavenCentral() mavenCentral()
} }
ext.checkstyleVersion = "10.18.1"
ext.springJavaformatCheckstyleVersion = "0.0.43"
ext.webjarsFontawesomeVersion = "4.7.0" ext.webjarsFontawesomeVersion = "4.7.0"
ext.webjarsBootstrapVersion = "5.3.3" ext.webjarsBootstrapVersion = "5.3.3"
@ -49,8 +51,8 @@ dependencies {
testImplementation 'org.springframework.boot:spring-boot-docker-compose' testImplementation 'org.springframework.boot:spring-boot-docker-compose'
testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.testcontainers:junit-jupiter'
testImplementation 'org.testcontainers:mysql' testImplementation 'org.testcontainers:mysql'
checkstyle 'io.spring.javaformat:spring-javaformat-checkstyle:0.0.41' checkstyle "io.spring.javaformat:spring-javaformat-checkstyle:${springJavaformatCheckstyleVersion}"
checkstyle 'com.puppycrawl.tools:checkstyle:10.16.0' checkstyle "com.puppycrawl.tools:checkstyle:${checkstyleVersion}"
} }
tasks.named('test') { tasks.named('test') {

View file

@ -1,6 +1,6 @@
services: services:
mysql: mysql:
image: mysql:8.4 image: mysql:9.0
ports: ports:
- "3306:3306" - "3306:3306"
environment: environment:
@ -14,7 +14,7 @@ services:
profiles: profiles:
- mysql - mysql
postgres: postgres:
image: postgres:16.3 image: postgres:17.0
ports: ports:
- "5432:5432" - "5432:5432"
environment: environment:

View file

@ -28,13 +28,13 @@
<webjars-bootstrap.version>5.3.3</webjars-bootstrap.version> <webjars-bootstrap.version>5.3.3</webjars-bootstrap.version>
<webjars-font-awesome.version>4.7.0</webjars-font-awesome.version> <webjars-font-awesome.version>4.7.0</webjars-font-awesome.version>
<checkstyle.version>10.16.0</checkstyle.version> <checkstyle.version>10.18.1</checkstyle.version>
<jacoco.version>0.8.12</jacoco.version> <jacoco.version>0.8.12</jacoco.version>
<libsass.version>0.2.29</libsass.version> <libsass.version>0.2.29</libsass.version>
<lifecycle-mapping>1.0.0</lifecycle-mapping> <lifecycle-mapping>1.0.0</lifecycle-mapping>
<maven-checkstyle.version>3.3.1</maven-checkstyle.version> <maven-checkstyle.version>3.5.0</maven-checkstyle.version>
<nohttp-checkstyle.version>0.0.11</nohttp-checkstyle.version> <nohttp-checkstyle.version>0.0.11</nohttp-checkstyle.version>
<spring-format.version>0.0.41</spring-format.version> <spring-format.version>0.0.43</spring-format.version>
</properties> </properties>

View file

@ -52,13 +52,13 @@ A similar setup is provided for MySQL and PostgreSQL if a persistent database co
You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker: You can start MySQL or PostgreSQL locally with whatever installer works for your OS or use docker:
```bash ```bash
docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:8.4 docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:9.0
``` ```
or or
```bash ```bash
docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:16.3 docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:17.0
``` ```
Further documentation is provided for [MySQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt) Further documentation is provided for [MySQL](https://github.com/spring-projects/spring-petclinic/blob/main/src/main/resources/db/mysql/petclinic_db_setup_mysql.txt)

View file

@ -46,7 +46,7 @@ class MySqlIntegrationTests {
@ServiceConnection @ServiceConnection
@Container @Container
static MySQLContainer<?> container = new MySQLContainer<>("mysql:8.4"); static MySQLContainer<?> container = new MySQLContainer<>("mysql:9.0");
@LocalServerPort @LocalServerPort
int port; int port;

View file

@ -36,7 +36,7 @@ public class MysqlTestApplication {
@Profile("mysql") @Profile("mysql")
@Bean @Bean
static MySQLContainer<?> container() { static MySQLContainer<?> container() {
return new MySQLContainer<>("mysql:8.4"); return new MySQLContainer<>("mysql:9.0");
} }
public static void main(String[] args) { public static void main(String[] args) {