From 915a1a7edf5d40debf09b7dc017c80aeeeed3d07 Mon Sep 17 00:00:00 2001 From: Lukasz Gryzbon Date: Sat, 3 Feb 2024 23:08:01 +0000 Subject: [PATCH] chore: #27 Upgrade Spring Boot to 3.2.2 BREAKING CHANGE: Major Spring Boot version upgrade --- build.gradle | 4 ++-- dependencies.gradle | 2 +- src/main/resources/META-INF/spring.factories | 1 - ...framework.boot.autoconfigure.AutoConfiguration.imports | 1 + .../lsd/distributed/postgres/integration/BaseIT.kt | 8 ++++---- test.gradle | 1 + 6 files changed, 9 insertions(+), 8 deletions(-) delete mode 100644 src/main/resources/META-INF/spring.factories create mode 100644 src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports diff --git a/build.gradle b/build.gradle index 690e8d5..e258ce8 100644 --- a/build.gradle +++ b/build.gradle @@ -1,7 +1,7 @@ import org.springframework.boot.gradle.plugin.SpringBootPlugin plugins { - id 'org.springframework.boot' version '2.7.10' + id 'org.springframework.boot' version '3.2.2' id 'io.spring.dependency-management' version '1.1.4' id 'java-library' id 'maven-publish' @@ -44,7 +44,7 @@ jacocoTestReport { apply plugin: 'io.spring.dependency-management' dependencyManagement { imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2021.0.6' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2023.0.0' mavenBom 'io.pivotal.spring.cloud:spring-cloud-services-dependencies:4.1.0' mavenBom SpringBootPlugin.BOM_COORDINATES } diff --git a/dependencies.gradle b/dependencies.gradle index f7c36b7..35688b5 100644 --- a/dependencies.gradle +++ b/dependencies.gradle @@ -8,7 +8,7 @@ dependencies { implementation 'io.github.lsd-consulting:lsd-logging-library:1.0.8' // Spring - compileOnly 'org.springframework.boot:spring-boot-autoconfigure:2.7.10' + compileOnly 'org.springframework.boot:spring-boot-autoconfigure:3.2.2' // Other implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.16.1' diff --git a/src/main/resources/META-INF/spring.factories b/src/main/resources/META-INF/spring.factories deleted file mode 100644 index 86cad6b..0000000 --- a/src/main/resources/META-INF/spring.factories +++ /dev/null @@ -1 +0,0 @@ -org.springframework.boot.autoconfigure.EnableAutoConfiguration=io.lsdconsulting.lsd.distributed.postgres.config.LibraryConfig diff --git a/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports new file mode 100644 index 0000000..48352cd --- /dev/null +++ b/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports @@ -0,0 +1 @@ +io.lsdconsulting.lsd.distributed.postgres.config.LibraryConfig diff --git a/src/test/kotlin/io/lsdconsulting/lsd/distributed/postgres/integration/BaseIT.kt b/src/test/kotlin/io/lsdconsulting/lsd/distributed/postgres/integration/BaseIT.kt index 031c4c3..914b63e 100644 --- a/src/test/kotlin/io/lsdconsulting/lsd/distributed/postgres/integration/BaseIT.kt +++ b/src/test/kotlin/io/lsdconsulting/lsd/distributed/postgres/integration/BaseIT.kt @@ -40,9 +40,9 @@ internal open class BaseIT { serviceName = RandomStringUtils.randomAlphanumeric(30), target = RandomStringUtils.randomAlphanumeric(30), path = RandomStringUtils.randomAlphanumeric(100), - httpStatus = HttpStatus.values()[RandomUtils.nextInt(0, HttpStatus.values().size - 1)].name, - httpMethod = HttpMethod.values()[RandomUtils.nextInt(0, HttpMethod.values().size - 1)].name, - interactionType = InteractionType.values()[RandomUtils.nextInt(0, InteractionType.values().size - 1)], + httpStatus = HttpStatus.entries[RandomUtils.nextInt(0, HttpStatus.entries.size - 1)].name, + httpMethod = HttpMethod.values()[RandomUtils.nextInt(0, HttpMethod.values().size - 1)].name(), + interactionType = InteractionType.entries[RandomUtils.nextInt(0, InteractionType.entries.size - 1)], profile = RandomStringUtils.randomAlphanumeric(20), elapsedTime = RandomUtils.nextLong(), createdAt = ZonedDateTime.now(ZoneId.of("UTC")).truncatedTo(MILLIS) @@ -78,4 +78,4 @@ internal open class BaseIT { postgreSQLContainer.stop() } } -} \ No newline at end of file +} diff --git a/test.gradle b/test.gradle index 2cfbfa4..f8fa029 100644 --- a/test.gradle +++ b/test.gradle @@ -6,6 +6,7 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-data-jpa' // Other + testImplementation 'org.junit.jupiter:junit-jupiter-engine:5.9.2' testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2' testImplementation 'org.junit.platform:junit-platform-commons:1.9.2' testImplementation 'org.awaitility:awaitility:4.1.1'