Skip to content

Commit 68dddfc

Browse files
committed
Spring 4.0.0 | Quarkus 3.30.1 | Micronaut 4.10.3 | Dropwizard 5.0.0
1 parent 5fd0a62 commit 68dddfc

File tree

23 files changed

+126
-96
lines changed

23 files changed

+126
-96
lines changed

docker-compose.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
version: "3.8"
21
services:
32
db:
43
container_name: db
5-
image: postgres:14.4
4+
image: postgres:18.1
65
restart: always
76
environment:
87
- POSTGRES_DB=postgres
@@ -13,7 +12,7 @@ services:
1312

1413
wiremock:
1514
container_name: wiremock
16-
image: wiremock/wiremock:3.0.0-1
15+
image: wiremock/wiremock:3.13.2
1716
ports:
1817
- "8888:8080"
1918
command: [ "--async-response-enabled=true", "--no-request-journal" ]

dropwizard-app/build.gradle

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
plugins {
22
id 'java'
33
id 'application'
4-
id 'com.github.johnrengelman.shadow' version '8.1.1'
4+
id 'com.gradleup.shadow' version '9.2.1'
55
}
66

77
group = 'bitxon.dropwizard'
@@ -18,45 +18,47 @@ repositories {
1818
}
1919

2020
dependencies {
21-
implementation project(":common-api")
22-
implementation enforcedPlatform("io.dropwizard:dropwizard-bom:4.0.12")
21+
implementation project(':common-api')
22+
implementation enforcedPlatform('io.dropwizard:dropwizard-bom:5.0.0')
2323
implementation 'io.dropwizard:dropwizard-core'
2424
implementation 'io.dropwizard:dropwizard-client'
2525
implementation 'io.dropwizard:dropwizard-validation'
2626
implementation 'io.dropwizard:dropwizard-hibernate'
27-
implementation 'org.mapstruct:mapstruct:1.5.3.Final'
27+
implementation 'org.mapstruct:mapstruct:1.6.3'
2828

29-
annotationProcessor 'org.projectlombok:lombok:1.18.36'
30-
annotationProcessor 'org.mapstruct:mapstruct-processor:1.5.3.Final'
29+
annotationProcessor 'org.projectlombok:lombok:1.18.42'
30+
annotationProcessor 'org.mapstruct:mapstruct-processor:1.6.3'
3131

32-
compileOnly 'org.projectlombok:lombok:1.18.36'
32+
compileOnly 'org.projectlombok:lombok:1.18.42'
3333

34-
runtimeOnly 'org.postgresql:postgresql:42.7.5'
34+
runtimeOnly 'org.postgresql:postgresql:42.7.8'
3535

3636
testImplementation 'io.dropwizard:dropwizard-testing'
37-
testImplementation project(":common-wiremock")
38-
testImplementation 'org.wiremock:wiremock:3.2.0'
39-
testImplementation 'com.google.code.findbugs:jsr305:3.0.2' //TODO research - dep should be transitive from wiremock
40-
testImplementation 'org.testcontainers:testcontainers:1.20.4'
41-
testImplementation 'org.testcontainers:junit-jupiter:1.20.4'
42-
testImplementation 'org.testcontainers:postgresql:1.20.4'
43-
testImplementation 'org.assertj:assertj-core:3.27.3'
44-
testImplementation 'io.rest-assured:rest-assured:5.5.0'
45-
testImplementation 'org.junit.jupiter:junit-jupiter-api'
37+
testImplementation project(':common-wiremock')
38+
testImplementation platform('org.testcontainers:testcontainers-bom:2.0.2')
39+
testImplementation 'org.wiremock:wiremock:3.13.2'
40+
testImplementation 'org.testcontainers:testcontainers'
41+
testImplementation 'org.testcontainers:testcontainers-junit-jupiter'
42+
testImplementation 'org.testcontainers:testcontainers-postgresql'
43+
testImplementation 'org.assertj:assertj-core:3.27.6'
44+
testImplementation 'io.rest-assured:rest-assured:5.5.6'
45+
testImplementation 'org.junit.jupiter:junit-jupiter'
4646
testImplementation 'org.junit.jupiter:junit-jupiter-params'
47-
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine'
47+
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
4848
}
4949

5050
test {
5151
useJUnitPlatform()
5252
}
5353

54-
mainClassName = 'bitxon.dropwizard.DropwizardApplication'
54+
application {
55+
mainClass = 'bitxon.dropwizard.DropwizardApplication'
56+
}
5557

5658
jar {
5759
manifest {
58-
attributes 'Main-Class': mainClassName
59-
attributes 'Build-Jdk-Spec': sourceCompatibility
60+
attributes 'Main-Class': application.mainClass
61+
attributes 'Build-Jdk-Spec': java.sourceCompatibility
6062
attributes 'Class-Path': sourceSets.main.runtimeClasspath.collect { it.name }.join(' ')
6163
}
6264
}

dropwizard-app/src/main/java/bitxon/dropwizard/DropwizardApplication.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public void initialize(final Bootstrap<DropwizardConfiguration> bootstrap) {
3636
bootstrap.setConfigurationSourceProvider(new ClasspathOrFileConfigurationSourceProvider());
3737

3838
bootstrap.addBundle(hibernate);
39+
40+
// TODO remove when Dropwizard 5 will release a fix with proper registration of Jackson's polymorphic subtypes
41+
bootstrap.getObjectMapper().registerSubtypes(
42+
io.dropwizard.jetty.HttpConnectorFactory.class,
43+
io.dropwizard.jetty.HttpsConnectorFactory.class
44+
);
3945
}
4046

4147
@Override

dropwizard-app/src/test/java/bitxon/dropwizard/test/AbstractDropwizardTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919

2020
abstract class AbstractDropwizardTest {
2121

22-
static PostgreSQLContainer DB = (PostgreSQLContainer) new PostgreSQLContainer(DockerImageName.parse("postgres").withTag("14.4"))
22+
static PostgreSQLContainer DB = (PostgreSQLContainer) new PostgreSQLContainer("postgres:18.1")
2323
.withDatabaseName("testdb")
2424
.withUsername("postgres")
2525
.withPassword("postgres")
2626
.withInitScript("sql/db-test-data.sql");
27-
static GenericContainer WIREMOCK = new GenericContainer("wiremock/wiremock:3.0.0-1")
27+
static GenericContainer WIREMOCK = new GenericContainer("wiremock/wiremock:3.13.2")
2828
.withExposedPorts(8080)
2929
.withCopyFileToContainer(MountableFile.forClasspathResource("stubs"), "/home/wiremock")
3030
.waitingFor(Wait

gradle/wrapper/gradle-wrapper.jar

121 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.2.1-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
# See the License for the specific language governing permissions and
1616
# limitations under the License.
1717
#
18+
# SPDX-License-Identifier: Apache-2.0
19+
#
1820

1921
##############################################################################
2022
#
@@ -55,7 +57,7 @@
5557
# Darwin, MinGW, and NonStop.
5658
#
5759
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
60+
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5961
# within the Gradle project.
6062
#
6163
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -84,7 +86,7 @@ done
8486
# shellcheck disable=SC2034
8587
APP_BASE_NAME=${0##*/}
8688
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87-
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
8890

8991
# Use the maximum available, or set MAX_FD != -1 to use that value.
9092
MAX_FD=maximum

gradlew.bat

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
@rem See the License for the specific language governing permissions and
1414
@rem limitations under the License.
1515
@rem
16+
@rem SPDX-License-Identifier: Apache-2.0
17+
@rem
1618

1719
@if "%DEBUG%"=="" @echo off
1820
@rem ##########################################################################
@@ -43,11 +45,11 @@ set JAVA_EXE=java.exe
4345
%JAVA_EXE% -version >NUL 2>&1
4446
if %ERRORLEVEL% equ 0 goto execute
4547

46-
echo.
47-
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
48-
echo.
49-
echo Please set the JAVA_HOME variable in your environment to match the
50-
echo location of your Java installation.
48+
echo. 1>&2
49+
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50+
echo. 1>&2
51+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52+
echo location of your Java installation. 1>&2
5153

5254
goto fail
5355

@@ -57,11 +59,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
5759

5860
if exist "%JAVA_EXE%" goto execute
5961

60-
echo.
61-
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
62-
echo.
63-
echo Please set the JAVA_HOME variable in your environment to match the
64-
echo location of your Java installation.
62+
echo. 1>&2
63+
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64+
echo. 1>&2
65+
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66+
echo location of your Java installation. 1>&2
6567

6668
goto fail
6769

loadtest/build.gradle

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
plugins {
22
id 'java'
3-
id 'io.gatling.gradle' version '3.11.4'
3+
id 'io.gatling.gradle' version '3.14.9'
44
}
55

66
group = 'bitxon'
77
version = '1.0-SNAPSHOT'
8-
sourceCompatibility = '17'
98

10-
repositories {
11-
mavenCentral()
9+
java {
10+
toolchain {
11+
languageVersion = JavaLanguageVersion.of(21)
12+
}
1213
}
1314

14-
dependencies {
15-
gatling
15+
repositories {
16+
mavenCentral()
1617
}
1718

1819
gatling {

loadtest/src/gatling/resources/gatling.conf

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ gatling {
1212
#rawFileBodiesInMemoryMaxSize = 10240 # Max bite size of raw files to be cached in memory
1313
#pebbleFileBodiesCacheMaxCapacity = 200 # Cache size for request body Pebble templates, set to 0 to disable
1414
#feederAdaptiveLoadModeThreshold = 100 # File size threshold (in MB). Below load eagerly in memory, above use batch mode with default buffer size
15-
#shutdownTimeout = 10000 # Milliseconds to wait for the actor system to shutdown
15+
#shutdownTimeout = 10000 # Milliseconds to wait for the engine to shutdown
1616
extract {
1717
regex {
1818
#cacheMaxCapacity = 200 # Cache size for the compiled regexes, set to 0 to disable caching
@@ -37,7 +37,7 @@ gatling {
3737
netty {
3838
#useNativeTransport = true # if Netty Linux native transport should be used instead of Java NIO
3939
#useIoUring = false # if io_uring should be used instead of epoll if available
40-
#allocator = "pooled" # switch to unpooled for unpooled ByteBufAllocator
40+
#allocator = "pooled" # force the ByteBufAllocator, possible values are pooled, unpooled and adaptive
4141
#maxThreadLocalCharBufferSize = 200000 # Netty's default is 16k
4242
}
4343
ssl {
@@ -64,15 +64,15 @@ gatling {
6464
}
6565
}
6666
charting {
67-
#maxPlotPerSeries = 1000 # Number of points per graph in Gatling reports
67+
#maxPlotPerSeries = 1000 # Number of points per chart in Gatling reports
6868
#useGroupDurationMetric = false # Switch group timings from cumulated response time to group duration.
6969
indicators {
7070
#lowerBound = 800 # Lower bound for the requests' response time to track in the reports and the console summary
7171
#higherBound = 1200 # Higher bound for the requests' response time to track in the reports and the console summary
72-
#percentile1 = 50 # Value for the 1st percentile to track in the reports, the console summary and Graphite
73-
#percentile2 = 75 # Value for the 2nd percentile to track in the reports, the console summary and Graphite
74-
#percentile3 = 95 # Value for the 3rd percentile to track in the reports, the console summary and Graphite
75-
#percentile4 = 99 # Value for the 4th percentile to track in the reports, the console summary and Graphite
72+
#percentile1 = 50 # Value for the 1st percentile to track in the reports and the console summary
73+
#percentile2 = 75 # Value for the 2nd percentile to track in the reports and the console summary
74+
#percentile3 = 95 # Value for the 3rd percentile to track in the reports and the console summary
75+
#percentile4 = 99 # Value for the 4th percentile to track in the reports and the console summary
7676
}
7777
}
7878
http {
@@ -82,7 +82,7 @@ gatling {
8282
#warmUpUrl = "https://gatling.io" # The URL to use to warm-up the HTTP stack (blank means disabled)
8383
#pooledConnectionIdleTimeout = 60000 # Timeout in millis for a connection to stay idle in the pool
8484
#requestTimeout = 60000 # Timeout in millis for performing an HTTP request
85-
#enableHostnameVerification = false # When set to true, enable hostname verification: SSLEngine.setHttpsEndpointIdentificationAlgorithm("HTTPS")
85+
#enableHostnameVerification = false # When set to true, enable hostname verification: SSLEngine#setEndpointIdentificationAlgorithm("HTTPS")
8686
dns {
8787
#queryTimeout = 5000 # Timeout in millis of each DNS query in millis
8888
#maxQueriesPerResolve = 6 # Maximum allowed number of DNS queries for a given name resolution
@@ -92,7 +92,7 @@ gatling {
9292
#replyTimeoutScanPeriod = 1000 # scan period for timed out reply messages
9393
}
9494
data {
95-
#writers = [console, file] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file, graphite)
95+
#writers = [console, file] # The list of DataWriters to which Gatling write simulation data (currently supported : console, file)
9696
#utcDateTime = true # Print date-times with the UTC zone instead of the System's default
9797
console {
9898
#light = false # When set to true, displays a light version without detailed request stats

0 commit comments

Comments
 (0)