From 017a810eed2dbb5b14c5a0bbd8563347f757288e Mon Sep 17 00:00:00 2001 From: Oliver Drotbohm Date: Wed, 1 Sep 2021 23:14:44 +0200 Subject: [PATCH] Upgrade to jMolecules 1.3 and jMolecules Integrations 0.5. Also switch to the ValueObject interface instead of the annotation for consistency. --- jdbc/jmolecules/pom.xml | 5 ++--- .../springdata/jdbc/jmolecules/customer/Address.java | 8 +++----- .../springdata/jdbc/jmolecules/order/LineItem.java | 6 ++---- .../jdbc/jmolecules/ApplicationIntegrationTests.java | 1 - mongodb/jmolecules/pom.xml | 5 ++--- .../java/example/springdata/mongodb/customer/Address.java | 6 ++---- .../java/example/springdata/mongodb/order/LineItem.java | 6 ++---- 7 files changed, 13 insertions(+), 24 deletions(-) diff --git a/jdbc/jmolecules/pom.xml b/jdbc/jmolecules/pom.xml index 62558caa..10373237 100644 --- a/jdbc/jmolecules/pom.xml +++ b/jdbc/jmolecules/pom.xml @@ -13,9 +13,8 @@ spring-data-jdbc-jmolecules - 2021.0.0-SNAPSHOT - 1.2.0 - 0.4.0 + 1.3.0 + 0.5.0 diff --git a/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/customer/Address.java b/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/customer/Address.java index 2fae856c..f6b68bbf 100644 --- a/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/customer/Address.java +++ b/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/customer/Address.java @@ -1,5 +1,5 @@ /* - * Copyright 2021-2021 the original author or authors. + * Copyright 2020-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,8 +15,6 @@ */ package example.springdata.jdbc.jmolecules.customer; -import org.jmolecules.ddd.annotation.ValueObject; +import org.jmolecules.ddd.types.ValueObject; -@ValueObject -public record Address(String street, String city, String zipCode) { -} +public record Address(String street, String city, String zipCode) implements ValueObject {} diff --git a/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/order/LineItem.java b/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/order/LineItem.java index 8418dfe6..73cfa60c 100644 --- a/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/order/LineItem.java +++ b/jdbc/jmolecules/src/main/java/example/springdata/jdbc/jmolecules/order/LineItem.java @@ -15,8 +15,6 @@ */ package example.springdata.jdbc.jmolecules.order; -import org.jmolecules.ddd.annotation.ValueObject; +import org.jmolecules.ddd.types.ValueObject; -@ValueObject -public record LineItem(String description) { -} +public record LineItem(String description) implements ValueObject {} diff --git a/jdbc/jmolecules/src/test/java/example/springdata/jdbc/jmolecules/ApplicationIntegrationTests.java b/jdbc/jmolecules/src/test/java/example/springdata/jdbc/jmolecules/ApplicationIntegrationTests.java index 3e316519..135330c5 100644 --- a/jdbc/jmolecules/src/test/java/example/springdata/jdbc/jmolecules/ApplicationIntegrationTests.java +++ b/jdbc/jmolecules/src/test/java/example/springdata/jdbc/jmolecules/ApplicationIntegrationTests.java @@ -22,7 +22,6 @@ import example.springdata.jdbc.jmolecules.customer.Customer; import example.springdata.jdbc.jmolecules.customer.Customers; import example.springdata.jdbc.jmolecules.order.Order; import example.springdata.jdbc.jmolecules.order.Orders; -import lombok.RequiredArgsConstructor; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; diff --git a/mongodb/jmolecules/pom.xml b/mongodb/jmolecules/pom.xml index 95e350d6..d8cf8960 100644 --- a/mongodb/jmolecules/pom.xml +++ b/mongodb/jmolecules/pom.xml @@ -13,9 +13,8 @@ spring-data-mongodb-jmolecules - 2021.0.0-SNAPSHOT - 1.2.0 - 0.4.0 + 1.3.0 + 0.5.0 diff --git a/mongodb/jmolecules/src/main/java/example/springdata/mongodb/customer/Address.java b/mongodb/jmolecules/src/main/java/example/springdata/mongodb/customer/Address.java index a1b2fa5e..9d3449f1 100644 --- a/mongodb/jmolecules/src/main/java/example/springdata/mongodb/customer/Address.java +++ b/mongodb/jmolecules/src/main/java/example/springdata/mongodb/customer/Address.java @@ -15,8 +15,6 @@ */ package example.springdata.mongodb.customer; -import org.jmolecules.ddd.annotation.ValueObject; +import org.jmolecules.ddd.types.ValueObject; -@ValueObject -public record Address(String street, String city, String zipCode) { -} +public record Address(String street, String city, String zipCode) implements ValueObject {} diff --git a/mongodb/jmolecules/src/main/java/example/springdata/mongodb/order/LineItem.java b/mongodb/jmolecules/src/main/java/example/springdata/mongodb/order/LineItem.java index 735d7474..32383bb2 100644 --- a/mongodb/jmolecules/src/main/java/example/springdata/mongodb/order/LineItem.java +++ b/mongodb/jmolecules/src/main/java/example/springdata/mongodb/order/LineItem.java @@ -15,8 +15,6 @@ */ package example.springdata.mongodb.order; -import org.jmolecules.ddd.annotation.ValueObject; +import org.jmolecules.ddd.types.ValueObject; -@ValueObject -public record LineItem(String description) { -} +public record LineItem(String description) implements ValueObject {}