Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ repositories {
}

dependencies {
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.1.7")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.1.0")
implementation("com.github.spotbugs.snom:spotbugs-gradle-plugin:6.1.13")
implementation("net.ltgt.gradle:gradle-errorprone-plugin:4.2.0")
implementation("info.solidsoft.gradle.pitest:gradle-pitest-plugin:1.15.0")
implementation("org.gradle:test-retry-gradle-plugin:1.6.2")
implementation("io.freefair.gradle:lombok-plugin:8.13.1")
Expand Down
8 changes: 8 additions & 0 deletions buildSrc/settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
rootProject.name = "java-experiments-conventions"

dependencyResolutionManagement {
versionCatalogs {
create("libs") {
from(files("../gradle/libs.versions.toml"))
}
}
}
8 changes: 8 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[versions]
spring-boot-v3 = "3.5.0"

[libraries]
spring-boot-v3-dependencies = { group = "org.springframework.boot", name = "spring-boot-dependencies", version.ref = "spring-boot-v3" }

[plugins]
spring-boot-v3 = { id = "org.springframework.boot", version.ref = "spring-boot-v3" }
2 changes: 1 addition & 1 deletion internal-bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ javaPlatform {
dependencies {
api(platform("org.junit:junit-bom:5.13.0"))
api(platform("org.testcontainers:testcontainers-bom:1.21.1"))
api(platform("io.github.mfvanek:pg-index-health-bom:0.14.6"))
api(platform("io.github.mfvanek:pg-index-health-bom:0.15.0"))
api(platform("org.mockito:mockito-bom:5.18.0"))
api(platform("org.assertj:assertj-bom:3.27.3"))

Expand Down
5 changes: 2 additions & 3 deletions internal-spring-boot-3-bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@ javaPlatform {

dependencies {
api(platform(project(":internal-bom")))
val spring3Version = "3.3.10"
api(platform("org.springframework.boot:spring-boot-dependencies:$spring3Version"))
api(platform(libs.spring.boot.v3.dependencies))

constraints {
api("org.springframework.boot:spring-boot-gradle-plugin:$spring3Version")
api("org.springframework.boot:spring-boot-gradle-plugin:${libs.versions.spring.boot.v3.get()}")
}
}
2 changes: 1 addition & 1 deletion mongo-db-reactive-app-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-experiments.java-conventions")
id("org.springframework.boot") version "3.3.10"
alias(libs.plugins.spring.boot.v3)
id("com.google.osdetector") version "1.7.3"
}

Expand Down
2 changes: 1 addition & 1 deletion spring-boot-app-example/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
plugins {
id("java-experiments.java-conventions")
id("org.springframework.boot") version "3.3.10"
alias(libs.plugins.spring.boot.v3)
id("com.google.osdetector") version "1.7.3"
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package io.github.mfvanek.pg.cluster.dtos;

import com.fasterxml.jackson.annotation.JsonCreator;
import jakarta.validation.constraints.DecimalMax;
import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

Expand All @@ -16,7 +16,6 @@
@Getter
@ToString
@SuperBuilder
@RequiredArgsConstructor
public final class EmployeeCreationRequest {

@NotNull
Expand All @@ -35,4 +34,15 @@ public final class EmployeeCreationRequest {
@DecimalMax("5000.00")
@DecimalMin("100.00")
private final BigDecimal salaryPerHour;

@JsonCreator
public EmployeeCreationRequest(String firstName,
String lastName,
int standardHoursPerDay,
BigDecimal salaryPerHour) {
this.firstName = firstName;
this.lastName = lastName;
this.standardHoursPerDay = standardHoursPerDay;
this.salaryPerHour = salaryPerHour;
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package io.github.mfvanek.pg.cluster.dtos;

import com.fasterxml.jackson.annotation.JsonCreator;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.ToString;
import lombok.experimental.SuperBuilder;

Expand All @@ -10,7 +10,6 @@
import java.util.Objects;
import java.util.UUID;

@RequiredArgsConstructor
@SuperBuilder
@Getter
@ToString
Expand All @@ -24,6 +23,23 @@ public final class EmployeeDto {
private final int standardHoursPerDay;
private final BigDecimal salaryPerHour;

@JsonCreator
public EmployeeDto(UUID id,
LocalDateTime createdAt,
LocalDateTime updatedAt,
String firstName,
String lastName,
int standardHoursPerDay,
BigDecimal salaryPerHour) {
this.id = id;
this.createdAt = createdAt;
this.updatedAt = updatedAt;
this.firstName = firstName;
this.lastName = lastName;
this.standardHoursPerDay = standardHoursPerDay;
this.salaryPerHour = salaryPerHour;
}

@Override
public boolean equals(Object o) {
if (this == o) {
Expand Down
2 changes: 1 addition & 1 deletion spring-only-app-example/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description = "Spring only application with embedded database"

dependencies {
implementation(platform(project(":internal-bom")))
implementation(platform("org.springframework:spring-framework-bom:6.2.6"))
implementation(platform("org.springframework:spring-framework-bom:6.2.7"))

implementation("org.springframework:spring-context")
implementation("org.springframework:spring-jdbc")
Expand Down