diff --git a/atomikos/pom.xml b/atomikos/pom.xml
index 8918de7b77..405231fea7 100644
--- a/atomikos/pom.xml
+++ b/atomikos/pom.xml
@@ -1,128 +1,128 @@
- 4.0.0
- atomikos
- atomikos
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ 4.0.0
+ atomikos
+ atomikos
-
- com.baeldung
- parent-modules
- 1.0.0-SNAPSHOT
-
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+
-
-
- com.atomikos
- transactions-jdbc
- ${atomikos-version}
-
-
- com.atomikos
- transactions-jms
- ${atomikos-version}
-
-
- com.atomikos
- transactions-hibernate4
- ${atomikos-version}
-
-
- org.springframework
- spring-context
- ${spring-version}
-
-
- org.springframework
- spring-tx
- ${spring-version}
-
-
- org.springframework.data
- spring-data-jpa
- ${spring-data-jpa.version}
-
-
- org.springframework
- spring-test
- ${spring-version}
- test
-
-
- org.hibernate
- hibernate-core
- ${hibernate.version}
- provided
-
-
- javax.transaction
- jta
-
-
-
-
- org.apache.activemq
- activemq-core
- ${activemq-core.version}
-
-
- org.apache.derby
- derby
- ${derby.version}
-
-
- junit
- junit
- ${junit.version}
- test
-
-
-
- javax.transaction
- jta
- ${jta.version}
-
-
- org.apache.geronimo.specs
- geronimo-jta_1.0.1B_spec
- ${geronimo.version}
-
-
- javax.validation
- validation-api
- ${validation-api.version}
-
-
- org.hibernate.validator
- hibernate-validator
- ${hibernate-validator.version}
-
-
- javax.el
- javax.el-api
- ${javax.el-api.version}
-
-
- org.glassfish.web
- javax.el
- ${javax.el.version}
-
-
+
+
+ com.atomikos
+ transactions-jdbc
+ ${atomikos-version}
+
+
+ com.atomikos
+ transactions-jms
+ ${atomikos-version}
+
+
+ com.atomikos
+ transactions-hibernate4
+ ${atomikos-version}
+
+
+ org.springframework
+ spring-context
+ ${spring-version}
+
+
+ org.springframework
+ spring-tx
+ ${spring-version}
+
+
+ org.springframework.data
+ spring-data-jpa
+ ${spring-data-jpa.version}
+
+
+ org.springframework
+ spring-test
+ ${spring-version}
+ test
+
+
+ org.hibernate
+ hibernate-core
+ ${hibernate.version}
+ provided
+
+
+ javax.transaction
+ jta
+
+
+
+
+ org.apache.activemq
+ activemq-core
+ ${activemq-core.version}
+
+
+ org.apache.derby
+ derby
+ ${derby.version}
+
+
+ junit
+ junit
+ ${junit.version}
+ test
+
+
+
+ javax.transaction
+ jta
+ ${jta.version}
+
+
+ org.apache.geronimo.specs
+ geronimo-jta_1.0.1B_spec
+ ${geronimo.version}
+
+
+ javax.validation
+ validation-api
+ ${validation-api.version}
+
+
+ org.hibernate.validator
+ hibernate-validator
+ ${hibernate-validator.version}
+
+
+ javax.el
+ javax.el-api
+ ${javax.el-api.version}
+
+
+ org.glassfish.web
+ javax.el
+ ${javax.el.version}
+
+
-
- 5.0.6
- 5.1.6.RELEASE
- 5.4.3.Final
- 1.11.23.RELEASE
- 5.7.0
- 10.8.1.2
- 1.1
- 1.0
- 2.0.1.Final
- 6.1.2.Final
- 3.0.0
- 2.2.4
-
+
+ 5.0.6
+ 5.1.6.RELEASE
+ 5.4.3.Final
+ 1.11.23.RELEASE
+ 5.7.0
+ 10.8.1.2
+ 1.1
+ 1.0
+ 2.0.1.Final
+ 6.1.2.Final
+ 3.0.0
+ 2.2.4
+
\ No newline at end of file
diff --git a/core-java-modules/core-java-11-2/pom.xml b/core-java-modules/core-java-11-2/pom.xml
index 3d008f5294..5f76c0bf3b 100644
--- a/core-java-modules/core-java-11-2/pom.xml
+++ b/core-java-modules/core-java-11-2/pom.xml
@@ -50,6 +50,11 @@
${junit.jupiter.version}
test
+
+ org.apache.commons
+ commons-lang3
+ ${commons-lang3.version}
+
@@ -73,6 +78,7 @@
5.7.0
3.17.2
5.11.1
+ 3.12.0
\ No newline at end of file
diff --git a/core-java-modules/core-java-11-2/src/test/java/com/baeldung/version/VersionUnitTest.java b/core-java-modules/core-java-11-2/src/test/java/com/baeldung/version/VersionUnitTest.java
new file mode 100644
index 0000000000..fb7d5647a5
--- /dev/null
+++ b/core-java-modules/core-java-11-2/src/test/java/com/baeldung/version/VersionUnitTest.java
@@ -0,0 +1,48 @@
+package com.baeldung.version;
+
+import org.apache.commons.lang3.SystemUtils;
+import org.assertj.core.api.Assertions;
+import org.junit.jupiter.api.Disabled;
+import org.junit.jupiter.api.Test;
+
+public class VersionUnitTest {
+
+ @Test
+ public void givenJava_whenUsingRuntime_thenGetVersion() {
+ String expectedVersion = "11";
+ Runtime.Version runtimeVersion = Runtime.version();
+ String version = String.valueOf(runtimeVersion.version().get(0));
+ Assertions.assertThat(version).isEqualTo(expectedVersion);
+ }
+
+ @Test
+ @Disabled("Only valid for Java 8 and lower")
+ public void givenJava_whenUsingCommonsLang_thenGetVersion() {
+ int expectedVersion = 8;
+ String[] versionElements = SystemUtils.JAVA_SPECIFICATION_VERSION.split("\\.");
+ int discard = Integer.parseInt(versionElements[0]);
+ int version;
+ if (discard == 1) {
+ version = Integer.parseInt(versionElements[1]);
+ } else {
+ version = discard;
+ }
+ Assertions.assertThat(version).isEqualTo(expectedVersion);
+ }
+
+ @Test
+ @Disabled("Only valid for Java 8 and lower")
+ public void givenJava_whenUsingSystemProp_thenGetVersion() {
+ int expectedVersion = 8;
+ String[] versionElements = System.getProperty("java.version").split("\\.");
+ int discard = Integer.parseInt(versionElements[0]);
+ int version;
+ if (discard == 1) {
+ version = Integer.parseInt(versionElements[1]);
+ } else {
+ version = discard;
+ }
+ Assertions.assertThat(version).isEqualTo(expectedVersion);
+ }
+}
+
diff --git a/core-java-modules/core-java-jpms/decoupling-pattern2/consumermodule2/pom.xml b/core-java-modules/core-java-jpms/decoupling-pattern2/consumermodule2/pom.xml
index 13d0b2d201..774319a067 100644
--- a/core-java-modules/core-java-jpms/decoupling-pattern2/consumermodule2/pom.xml
+++ b/core-java-modules/core-java-jpms/decoupling-pattern2/consumermodule2/pom.xml
@@ -45,4 +45,4 @@
1.0
-
\ No newline at end of file
+
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Car.java b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Car.java
new file mode 100644
index 0000000000..6f17ecc536
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Car.java
@@ -0,0 +1,42 @@
+package com.baeldung.interfacevsabstractclass;
+
+public class Car extends Vehicle {
+
+ public Car(String vechicleName) {
+ super(vechicleName);
+ }
+
+ public Car(String vechicleName, String vehicleModel) {
+ super(vechicleName, vehicleModel);
+ }
+
+ public Car(String vechicleName, String vehicleModel, Long makeYear) {
+ super(vechicleName, vehicleModel, makeYear);
+ }
+
+ @Override
+ protected void start() {
+ // code implementation details on starting a car.
+ }
+
+ @Override
+ protected void stop() {
+ // code implementation details on stopping a car.
+ }
+
+ @Override
+ protected void drive() {
+ // code implementation details on start driving a car.
+ }
+
+ @Override
+ protected void changeGear() {
+ // code implementation details on changing the car gear.
+ }
+
+ @Override
+ protected void reverse() {
+ // code implementation details on reverse driving a car.
+ }
+
+}
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/ImageSender.java b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/ImageSender.java
new file mode 100644
index 0000000000..1948cc6583
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/ImageSender.java
@@ -0,0 +1,12 @@
+package com.baeldung.interfacevsabstractclass;
+
+import java.io.File;
+
+public class ImageSender implements Sender {
+
+ @Override
+ public void send(File fileToBeSent) {
+ // image sending implementation code.
+ }
+
+}
\ No newline at end of file
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Sender.java b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Sender.java
new file mode 100644
index 0000000000..fde6527ef6
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Sender.java
@@ -0,0 +1,8 @@
+package com.baeldung.interfacevsabstractclass;
+
+import java.io.File;
+
+public interface Sender {
+
+ void send(File fileToBeSent);
+}
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Vehicle.java b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Vehicle.java
new file mode 100644
index 0000000000..d98b8ca93b
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/Vehicle.java
@@ -0,0 +1,57 @@
+package com.baeldung.interfacevsabstractclass;
+
+public abstract class Vehicle {
+
+ private String vehicleName;
+ private String vehicleModel;
+ private Long makeYear;
+
+ public Vehicle(String vehicleName) {
+ this.vehicleName = vehicleName;
+ }
+
+ public Vehicle(String vehicleName, String vehicleModel) {
+ this(vehicleName);
+ this.vehicleModel = vehicleModel;
+ }
+
+ public Vehicle(String vechicleName, String vehicleModel, Long makeYear) {
+ this(vechicleName, vehicleModel);
+ this.makeYear = makeYear;
+ }
+
+ public String getVehicleName() {
+ return vehicleName;
+ }
+
+ public void setVehicleName(String vehicleName) {
+ this.vehicleName = vehicleName;
+ }
+
+ public String getVehicleModel() {
+ return vehicleModel;
+ }
+
+ public void setVehicleModel(String vehicleModel) {
+ this.vehicleModel = vehicleModel;
+ }
+
+ public Long getMakeYear() {
+ return makeYear;
+ }
+
+ public void setMakeYear(Long makeYear) {
+ this.makeYear = makeYear;
+ }
+
+ protected abstract void start();
+
+ protected abstract void stop();
+
+ protected abstract void drive();
+
+ protected abstract void changeGear();
+
+ protected abstract void reverse();
+
+}
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/VideoSender.java b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/VideoSender.java
new file mode 100644
index 0000000000..71f8050590
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/main/java/com/baeldung/interfacevsabstractclass/VideoSender.java
@@ -0,0 +1,12 @@
+package com.baeldung.interfacevsabstractclass;
+
+import java.io.File;
+
+public class VideoSender implements Sender {
+
+ @Override
+ public void send(File fileToBeSent) {
+ // video sending implementation code
+ }
+
+}
\ No newline at end of file
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/test/java/com/baeldung/interfacevsabstractclass/SenderUnitTest.java b/core-java-modules/core-java-lang-oop-patterns/src/test/java/com/baeldung/interfacevsabstractclass/SenderUnitTest.java
new file mode 100644
index 0000000000..6419721b3a
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/test/java/com/baeldung/interfacevsabstractclass/SenderUnitTest.java
@@ -0,0 +1,23 @@
+package com.baeldung.interfacevsabstractclass;
+
+import static org.junit.jupiter.api.Assertions.*;
+import org.junit.jupiter.api.Test;
+
+import com.baeldung.interfacevsabstractclass.ImageSender;
+import com.baeldung.interfacevsabstractclass.Sender;
+
+import java.io.File;
+
+class SenderUnitTest {
+
+ public final static String IMAGE_FILE_PATH = "/sample_image_file_path/photo.jpg";
+
+ @Test
+ void givenImageUploaded_whenButtonClicked_thenSendImage() {
+ File imageFile = new File(IMAGE_FILE_PATH);
+
+ Sender sender = new ImageSender();
+ sender.send(imageFile);
+ }
+
+}
diff --git a/core-java-modules/core-java-lang-oop-patterns/src/test/java/com/baeldung/interfacevsabstractclass/VehicleUnitTest.java b/core-java-modules/core-java-lang-oop-patterns/src/test/java/com/baeldung/interfacevsabstractclass/VehicleUnitTest.java
new file mode 100644
index 0000000000..1650ab9257
--- /dev/null
+++ b/core-java-modules/core-java-lang-oop-patterns/src/test/java/com/baeldung/interfacevsabstractclass/VehicleUnitTest.java
@@ -0,0 +1,22 @@
+package com.baeldung.interfacevsabstractclass;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+import org.junit.jupiter.api.Test;
+
+import com.baeldung.interfacevsabstractclass.Car;
+import com.baeldung.interfacevsabstractclass.Vehicle;
+
+class VehicleUnitTest {
+
+ @Test
+ void givenVehicle_whenNeedToDrive_thenStart() {
+ Vehicle car = new Car("BMW");
+
+ car.start();
+ car.drive();
+ car.changeGear();
+ car.stop();
+ }
+
+}
diff --git a/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/download/FileDownloadIntegrationTest.java b/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/download/FileDownloadIntegrationTest.java
index 16017ee482..987a69582f 100644
--- a/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/download/FileDownloadIntegrationTest.java
+++ b/core-java-modules/core-java-networking-2/src/test/java/com/baeldung/download/FileDownloadIntegrationTest.java
@@ -17,9 +17,9 @@ import static org.junit.Assert.assertTrue;
public class FileDownloadIntegrationTest {
- static String FILE_URL = "http://ovh.net/files/1Mio.dat";
+ static String FILE_URL = "https://s3.amazonaws.com/baeldung.com/Do+JSON+with+Jackson+by+Baeldung.pdf";
static String FILE_NAME = "file.dat";
- static String FILE_MD5_HASH = "6cb91af4ed4c60c11613b75cd1fc6116";
+ static String FILE_MD5_HASH = "c959feb066b37f5c4f0e0f45bbbb4f86";
@Test
public void givenJavaIO_whenDownloadingFile_thenDownloadShouldBeCorrect() throws NoSuchAlgorithmException, IOException {
diff --git a/core-java-modules/core-java-streams-3/pom.xml b/core-java-modules/core-java-streams-3/pom.xml
index 659f1937f2..01b83f229a 100644
--- a/core-java-modules/core-java-streams-3/pom.xml
+++ b/core-java-modules/core-java-streams-3/pom.xml
@@ -27,6 +27,17 @@
${lombok.version}
provided
+
+ org.openjdk.jmh
+ jmh-core
+ ${jmh.version}
+
+
+ org.openjdk.jmh
+ jmh-generator-annprocess
+ ${jmh.version}
+ test
+
org.assertj
@@ -44,11 +55,30 @@
true
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.8
+ 1.8
+
+
+ org.openjdk.jmh
+ jmh-generator-annprocess
+ ${jmh.version}
+
+
+
+
+
+ 1.18.20
3.6.1
+ 1.29
\ No newline at end of file
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/BenchmarkRunner.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/BenchmarkRunner.java
new file mode 100644
index 0000000000..461d728ad0
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/BenchmarkRunner.java
@@ -0,0 +1,9 @@
+package com.baeldung.streams.parallel;
+
+public class BenchmarkRunner {
+
+ public static void main(String[] args) throws Exception {
+ org.openjdk.jmh.Main.main(args);
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/DifferentSourceSplitting.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/DifferentSourceSplitting.java
new file mode 100644
index 0000000000..9ad569df30
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/DifferentSourceSplitting.java
@@ -0,0 +1,54 @@
+package com.baeldung.streams.parallel;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
+
+public class DifferentSourceSplitting {
+
+ private static final List arrayListOfNumbers = new ArrayList<>();
+ private static final List linkedListOfNumbers = new LinkedList<>();
+
+ static {
+ IntStream.rangeClosed(1, 1_000_000).forEach(i -> {
+ arrayListOfNumbers.add(i);
+ linkedListOfNumbers.add(i);
+ });
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void differentSourceArrayListSequential() {
+ arrayListOfNumbers.stream().reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void differentSourceArrayListParallel() {
+ arrayListOfNumbers.parallelStream().reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void differentSourceLinkedListSequential() {
+ linkedListOfNumbers.stream().reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void differentSourceLinkedListParallel() {
+ linkedListOfNumbers.parallelStream().reduce(0, Integer::sum);
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/MemoryLocalityCosts.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/MemoryLocalityCosts.java
new file mode 100644
index 0000000000..bc5cbf491b
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/MemoryLocalityCosts.java
@@ -0,0 +1,52 @@
+package com.baeldung.streams.parallel;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
+
+public class MemoryLocalityCosts {
+
+ private static final int[] intArray = new int[1_000_000];
+ private static final Integer[] integerArray = new Integer[1_000_000];
+
+ static {
+ IntStream.rangeClosed(1, 1_000_000).forEach(i -> {
+ intArray[i-1] = i;
+ integerArray[i-1] = i;
+ });
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void localityIntArraySequential() {
+ Arrays.stream(intArray).reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void localityIntArrayParallel() {
+ Arrays.stream(intArray).parallel().reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void localityIntegerArraySequential() {
+ Arrays.stream(integerArray).reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void localityIntegerArrayParallel() {
+ Arrays.stream(integerArray).parallel().reduce(0, Integer::sum);
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/MergingCosts.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/MergingCosts.java
new file mode 100644
index 0000000000..a9919dbe72
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/MergingCosts.java
@@ -0,0 +1,52 @@
+package com.baeldung.streams.parallel;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+import java.util.stream.Collectors;
+import java.util.stream.IntStream;
+
+public class MergingCosts {
+
+ private static final List arrayListOfNumbers = new ArrayList<>();
+
+ static {
+ IntStream.rangeClosed(1, 1_000_000).forEach(i -> {
+ arrayListOfNumbers.add(i);
+ });
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void mergingCostsSumSequential() {
+ arrayListOfNumbers.stream().reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void mergingCostsSumParallel() {
+ arrayListOfNumbers.stream().parallel().reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void mergingCostsGroupingSequential() {
+ arrayListOfNumbers.stream().collect(Collectors.toSet());
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void mergingCostsGroupingParallel() {
+ arrayListOfNumbers.stream().parallel().collect(Collectors.toSet());
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/ParallelStream.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/ParallelStream.java
new file mode 100644
index 0000000000..f236f418e8
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/ParallelStream.java
@@ -0,0 +1,15 @@
+package com.baeldung.streams.parallel;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class ParallelStream {
+
+ public static void main(String[] args) {
+ List listOfNumbers = Arrays.asList(1, 2, 3, 4);
+ listOfNumbers.parallelStream().forEach(number ->
+ System.out.println(number + " " + Thread.currentThread().getName())
+ );
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/SequentialStream.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/SequentialStream.java
new file mode 100644
index 0000000000..01379130fa
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/SequentialStream.java
@@ -0,0 +1,15 @@
+package com.baeldung.streams.parallel;
+
+import java.util.Arrays;
+import java.util.List;
+
+public class SequentialStream {
+
+ public static void main(String[] args) {
+ List listOfNumbers = Arrays.asList(1, 2, 3, 4);
+ listOfNumbers.stream().forEach(number ->
+ System.out.println(number + " " + Thread.currentThread().getName())
+ );
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/SplittingCosts.java b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/SplittingCosts.java
new file mode 100644
index 0000000000..d1e878df1f
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/main/java/com/baeldung/streams/parallel/SplittingCosts.java
@@ -0,0 +1,27 @@
+package com.baeldung.streams.parallel;
+
+import org.openjdk.jmh.annotations.Benchmark;
+import org.openjdk.jmh.annotations.BenchmarkMode;
+import org.openjdk.jmh.annotations.Mode;
+import org.openjdk.jmh.annotations.OutputTimeUnit;
+
+import java.util.concurrent.TimeUnit;
+import java.util.stream.IntStream;
+
+public class SplittingCosts {
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void sourceSplittingIntStreamSequential() {
+ IntStream.rangeClosed(1, 100).reduce(0, Integer::sum);
+ }
+
+ @Benchmark
+ @BenchmarkMode(Mode.AverageTime)
+ @OutputTimeUnit(TimeUnit.NANOSECONDS)
+ public static void sourceSplittingIntStreamParallel() {
+ IntStream.rangeClosed(1, 100).parallel().reduce(0, Integer::sum);
+ }
+
+}
diff --git a/core-java-modules/core-java-streams-3/src/test/java/com/baeldung/streams/parallel/ForkJoinUnitTest.java b/core-java-modules/core-java-streams-3/src/test/java/com/baeldung/streams/parallel/ForkJoinUnitTest.java
new file mode 100644
index 0000000000..f9aab8ed6c
--- /dev/null
+++ b/core-java-modules/core-java-streams-3/src/test/java/com/baeldung/streams/parallel/ForkJoinUnitTest.java
@@ -0,0 +1,46 @@
+package com.baeldung.streams.parallel;
+
+import org.junit.jupiter.api.Test;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ForkJoinPool;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+class ForkJoinUnitTest {
+
+ @Test
+ void givenSequentialStreamOfNumbers_whenReducingSumWithIdentityFive_thenResultIsCorrect() {
+ List listOfNumbers = Arrays.asList(1, 2, 3, 4);
+ int sum = listOfNumbers.stream().reduce(5, Integer::sum);
+ assertThat(sum).isEqualTo(15);
+ }
+
+ @Test
+ void givenParallelStreamOfNumbers_whenReducingSumWithIdentityFive_thenResultIsNotCorrect() {
+ List listOfNumbers = Arrays.asList(1, 2, 3, 4);
+ int sum = listOfNumbers.parallelStream().reduce(5, Integer::sum);
+ assertThat(sum).isNotEqualTo(15);
+ }
+
+ @Test
+ void givenParallelStreamOfNumbers_whenReducingSumWithIdentityZero_thenResultIsCorrect() {
+ List listOfNumbers = Arrays.asList(1, 2, 3, 4);
+ int sum = listOfNumbers.parallelStream().reduce(0, Integer::sum) + 5;
+ assertThat(sum).isEqualTo(15);
+ }
+
+ @Test
+ public void givenParallelStreamOfNumbers_whenUsingCustomThreadPool_thenResultIsCorrect()
+ throws InterruptedException, ExecutionException {
+ List listOfNumbers = Arrays.asList(1, 2, 3, 4);
+ ForkJoinPool customThreadPool = new ForkJoinPool(4);
+ int sum = customThreadPool.submit(
+ () -> listOfNumbers.parallelStream().reduce(0, Integer::sum)).get();
+ customThreadPool.shutdown();
+ assertThat(sum).isEqualTo(10);
+ }
+
+}
diff --git a/core-java-modules/core-java-string-operations-3/src/test/java/com/baeldung/splitkeepdelimiters/SplitAndKeepDelimitersUnitTest.java b/core-java-modules/core-java-string-operations-3/src/test/java/com/baeldung/splitkeepdelimiters/SplitAndKeepDelimitersUnitTest.java
new file mode 100644
index 0000000000..ede8be4c05
--- /dev/null
+++ b/core-java-modules/core-java-string-operations-3/src/test/java/com/baeldung/splitkeepdelimiters/SplitAndKeepDelimitersUnitTest.java
@@ -0,0 +1,59 @@
+package com.baeldung.splitkeepdelimiters;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.util.regex.Pattern;
+
+import org.apache.commons.lang3.StringUtils;
+import org.junit.jupiter.api.Test;
+
+import com.google.common.base.Splitter;
+
+public class SplitAndKeepDelimitersUnitTest {
+
+ private final String positivelookAheadRegex = "((?=@))";
+ private final String positivelookBehindRegex = "((?<=@))";
+ private final String positivelookAroundRegex = "((?=@)|(?<=@))";
+ private final String positiveLookAroundMultiDelimiterRegex = "((?=:|#|@)|(?<=:|#|@))";
+
+ private String text = "Hello@World@This@Is@A@Java@Program";
+ private String textMixed = "@HelloWorld@This:Is@A#Java#Program";
+ private String textMixed2 = "pg@no;10@hello;world@this;is@a#10words;Java#Program";
+
+ @Test
+ public void givenString_splitAndKeepDelimiters_using_javaLangString() {
+
+ assertThat(text.split(positivelookAheadRegex)).containsExactly("Hello", "@World", "@This", "@Is", "@A", "@Java", "@Program");
+
+ assertThat(text.split(positivelookBehindRegex)).containsExactly("Hello@", "World@", "This@", "Is@", "A@", "Java@", "Program");
+
+ assertThat(text.split(positivelookAroundRegex)).containsExactly("Hello", "@", "World", "@", "This", "@", "Is", "@", "A", "@", "Java", "@", "Program");
+
+ assertThat(textMixed.split(positiveLookAroundMultiDelimiterRegex)).containsExactly("@", "HelloWorld", "@", "This", ":", "Is", "@", "A", "#", "Java", "#", "Program");
+
+ }
+
+ @Test
+ public void givenString_splitAndKeepDelimiters_using_ApacheCommonsLang3StringUtils() {
+
+ assertThat(StringUtils.splitByCharacterType(textMixed2)).containsExactly("pg", "@", "no", ";", "10", "@", "hello", ";", "world", "@", "this", ";", "is", "@", "a", "#", "10", "words", ";", "J", "ava", "#", "P", "rogram");
+
+ }
+
+ @Test
+ public void givenString_splitAndKeepDelimiters_using_GuavaSplitter() {
+
+ assertThat(Splitter.onPattern(positivelookAroundRegex)
+ .splitToList(text)).containsExactly("Hello", "@", "World", "@", "This", "@", "Is", "@", "A", "@", "Java", "@", "Program");
+
+ assertThat(Splitter.on(Pattern.compile(positivelookAroundRegex))
+ .splitToList(text)).containsExactly("Hello", "@", "World", "@", "This", "@", "Is", "@", "A", "@", "Java", "@", "Program");
+
+ assertThat(Splitter.onPattern(positiveLookAroundMultiDelimiterRegex)
+ .splitToList(textMixed)).containsExactly("@", "HelloWorld", "@", "This", ":", "Is", "@", "A", "#", "Java", "#", "Program");
+
+ assertThat(Splitter.on(Pattern.compile(positiveLookAroundMultiDelimiterRegex))
+ .splitToList(textMixed)).containsExactly("@", "HelloWorld", "@", "This", ":", "Is", "@", "A", "#", "Java", "#", "Program");
+
+ }
+}
diff --git a/couchbase/pom.xml b/couchbase/pom.xml
index 34e2832e55..e87975a53c 100644
--- a/couchbase/pom.xml
+++ b/couchbase/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -72,4 +71,4 @@
4.3.5.RELEASE
-
+
\ No newline at end of file
diff --git a/custom-pmd/pom.xml b/custom-pmd/pom.xml
index 50bd16e2d5..550f96de33 100644
--- a/custom-pmd/pom.xml
+++ b/custom-pmd/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -51,4 +50,4 @@
1.8
-
+
\ No newline at end of file
diff --git a/dagger/pom.xml b/dagger/pom.xml
index e9410ceb63..304b0e428e 100644
--- a/dagger/pom.xml
+++ b/dagger/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -46,4 +45,4 @@
2.16
-
+
\ No newline at end of file
diff --git a/data-structures/pom.xml b/data-structures/pom.xml
index 7bf34b1c63..cba602878f 100644
--- a/data-structures/pom.xml
+++ b/data-structures/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -44,4 +43,4 @@
0.7.0
-
+
\ No newline at end of file
diff --git a/ddd/pom.xml b/ddd/pom.xml
index 41fccc7d5f..77cf1f5341 100644
--- a/ddd/pom.xml
+++ b/ddd/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -101,6 +100,5 @@
1.0.1
-
-
+
\ No newline at end of file
diff --git a/deeplearning4j/pom.xml b/deeplearning4j/pom.xml
index af65aa7e03..f1f9b9fa7b 100644
--- a/deeplearning4j/pom.xml
+++ b/deeplearning4j/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -66,4 +65,4 @@
1.7.5
-
+
\ No newline at end of file
diff --git a/discord4j/pom.xml b/discord4j/pom.xml
index 07fa3fa72e..1e73e5109b 100644
--- a/discord4j/pom.xml
+++ b/discord4j/pom.xml
@@ -1,12 +1,13 @@
-
- 4.0.0
- com.baeldung
- discord4j
- 0.0.1-SNAPSHOT
- discord4j
- Demo Discord bot using Discord4J + Spring Boot
+
+ 4.0.0
+ com.baeldung
+ discord4j
+ 0.0.1-SNAPSHOT
+ discord4j
+ Demo Discord bot using Discord4J + Spring Boot
com.baeldung
@@ -15,58 +16,56 @@
../parent-boot-2
-
-
- org.springframework.boot
- spring-boot-starter
-
-
- org.springframework.boot
- spring-boot-starter-webflux
-
-
- org.springframework.boot
- spring-boot-starter-actuator
-
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-webflux
+
+
+ org.springframework.boot
+ spring-boot-starter-actuator
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+ com.discord4j
+ discord4j-core
+ 3.1.1
+
+
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.junit.vintage
- junit-vintage-engine
-
-
-
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.8
+ 1.8
+
+
+
+
-
- com.discord4j
- discord4j-core
- 3.1.1
-
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
- 1.8
- 1.8
-
-
-
-
-
1.8
-
+
\ No newline at end of file
diff --git a/disruptor/pom.xml b/disruptor/pom.xml
index 31fc28986b..c2f9cf34b0 100644
--- a/disruptor/pom.xml
+++ b/disruptor/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -87,7 +86,8 @@
true
-
+
org.baeldung.executable.ExecutableMavenJar
diff --git a/dozer/pom.xml b/dozer/pom.xml
index 0fdf7f6fba..840763445c 100644
--- a/dozer/pom.xml
+++ b/dozer/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -31,4 +30,4 @@
5.5.1
-
+
\ No newline at end of file
diff --git a/drools/pom.xml b/drools/pom.xml
index e0a7b52938..cc96d9d032 100644
--- a/drools/pom.xml
+++ b/drools/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -65,4 +64,4 @@
7.10.0.Final
-
+
\ No newline at end of file
diff --git a/dropwizard/pom.xml b/dropwizard/pom.xml
index c3e1a4e841..36f2ec43f0 100644
--- a/dropwizard/pom.xml
+++ b/dropwizard/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -49,8 +48,10 @@
-
-
+
+
com.baeldung.dropwizard.introduction.IntroductionApplication
diff --git a/dubbo/pom.xml b/dubbo/pom.xml
index cca1b3a3d1..76e09c4375 100644
--- a/dubbo/pom.xml
+++ b/dubbo/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -37,4 +36,4 @@
0.10
-
+
\ No newline at end of file
diff --git a/ethereum/pom.xml b/ethereum/pom.xml
index 5953195123..4283714b98 100644
--- a/ethereum/pom.xml
+++ b/ethereum/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -16,14 +15,12 @@
-
org.springframework.boot
spring-boot-starter
${spring.boot.version}
-
org.springframework.boot
spring-boot-starter-web
@@ -34,7 +31,6 @@
spring-boot-starter-tomcat
${spring.boot.version}
-
org.springframework
@@ -51,7 +47,6 @@
spring-webmvc
${spring.version}
-
org.ethereum
@@ -63,7 +58,6 @@
core
${web3j.core.version}
-
com.fasterxml.jackson.core
@@ -80,7 +74,6 @@
jackson-annotations
${jackson.version}
-
javax.servlet
@@ -102,7 +95,6 @@
javax.servlet.jsp-api
${javax.servlet.jsp-api.version}
-
org.slf4j
@@ -114,7 +106,6 @@
logback-classic
${logback.version}
-
org.springframework.boot
@@ -133,7 +124,6 @@
${spring.version}
test
-
org.mockito
@@ -219,4 +209,4 @@
2.0.4.RELEASE
3.1
-
+
\ No newline at end of file
diff --git a/feign/pom.xml b/feign/pom.xml
index da3cbcb0fd..56059d2a77 100644
--- a/feign/pom.xml
+++ b/feign/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -43,4 +42,4 @@
10.11
-
+
\ No newline at end of file
diff --git a/flyway-cdi-extension/pom.xml b/flyway-cdi-extension/pom.xml
index 566eed95d8..757d1e0a7f 100644
--- a/flyway-cdi-extension/pom.xml
+++ b/flyway-cdi-extension/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -57,4 +56,4 @@
8.5.33
1.3.2
-
+
\ No newline at end of file
diff --git a/google-cloud/pom.xml b/google-cloud/pom.xml
index 1e474b5dd0..72b9647bc8 100644
--- a/google-cloud/pom.xml
+++ b/google-cloud/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -35,4 +34,4 @@
1.16.0
-
+
\ No newline at end of file
diff --git a/google-web-toolkit/pom.xml b/google-web-toolkit/pom.xml
index 1ff5081343..6b93ccbc71 100644
--- a/google-web-toolkit/pom.xml
+++ b/google-web-toolkit/pom.xml
@@ -1,6 +1,5 @@
-
@@ -54,11 +53,10 @@
-
+
${project.build.directory}/${project.build.finalName}/WEB-INF/classes
-
-
net.ltgt.gwt.maven
@@ -76,7 +74,8 @@
com.baeldung.Google_web_toolkit
Google_web_toolkit
true
-
+
${maven.compiler.source}
@@ -93,7 +92,6 @@
-
maven-surefire-plugin
@@ -101,19 +99,16 @@
true
-
-
-
+
1.8
1.8
-
2.8.2
1.0-rc-8
-
+
\ No newline at end of file
diff --git a/graphql/graphql-java/pom.xml b/graphql/graphql-java/pom.xml
index 30bfbf555a..eae30aa8fa 100644
--- a/graphql/graphql-java/pom.xml
+++ b/graphql/graphql-java/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
diff --git a/grpc/pom.xml b/grpc/pom.xml
index 5e1c0bb28b..c3e4996c29 100644
--- a/grpc/pom.xml
+++ b/grpc/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -78,4 +77,4 @@
1.6.1
0.6.1
-
+
\ No newline at end of file
diff --git a/gson/pom.xml b/gson/pom.xml
index 0de9a6a533..a928d87b61 100644
--- a/gson/pom.xml
+++ b/gson/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
diff --git a/guava-modules/guava-18/pom.xml b/guava-modules/guava-18/pom.xml
index d65fab1e57..ed295db2f4 100644
--- a/guava-modules/guava-18/pom.xml
+++ b/guava-modules/guava-18/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
guava-18
0.1.0-SNAPSHOT
diff --git a/guava-modules/guava-19/pom.xml b/guava-modules/guava-19/pom.xml
index 20a405cff4..3c29a2a59c 100644
--- a/guava-modules/guava-19/pom.xml
+++ b/guava-modules/guava-19/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
guava-19
0.1.0-SNAPSHOT
diff --git a/guava-modules/guava-21/pom.xml b/guava-modules/guava-21/pom.xml
index b793f11a7f..8b7c3cdcfd 100644
--- a/guava-modules/guava-21/pom.xml
+++ b/guava-modules/guava-21/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
guava-21
1.0-SNAPSHOT
diff --git a/guava-modules/guava-collections-list/pom.xml b/guava-modules/guava-collections-list/pom.xml
index 78a4aeb8ea..d281be2235 100644
--- a/guava-modules/guava-collections-list/pom.xml
+++ b/guava-modules/guava-collections-list/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -27,7 +26,6 @@
commons-lang3
${commons-lang3.version}
-
org.junit.jupiter
@@ -47,7 +45,6 @@
${assertj.version}
test
-
org.hamcrest
@@ -58,8 +55,7 @@
- guava-collections
-
+ guava-collections-list
src/main/resources
@@ -71,7 +67,6 @@
4.1
-
3.6.1
2.0.0.0
diff --git a/guava-modules/guava-collections-map/pom.xml b/guava-modules/guava-collections-map/pom.xml
index f3f829f25f..a03a779b3e 100644
--- a/guava-modules/guava-collections-map/pom.xml
+++ b/guava-modules/guava-collections-map/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.guava
guava-collections-map
@@ -31,7 +32,6 @@
guava-collections-map
-
src/main/resources
diff --git a/guava-modules/guava-collections-set/pom.xml b/guava-modules/guava-collections-set/pom.xml
index 0e53527aef..b989966a54 100644
--- a/guava-modules/guava-collections-set/pom.xml
+++ b/guava-modules/guava-collections-set/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
guava-collections-set
0.1.0-SNAPSHOT
@@ -45,4 +46,4 @@
5.6.2
-
+
\ No newline at end of file
diff --git a/guava-modules/guava-collections/pom.xml b/guava-modules/guava-collections/pom.xml
index 90ed99bab7..021c4c6037 100644
--- a/guava-modules/guava-collections/pom.xml
+++ b/guava-modules/guava-collections/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -32,7 +31,6 @@
jool
${jool.version}
-
org.junit.jupiter
@@ -52,7 +50,6 @@
${assertj.version}
test
-
org.hamcrest
@@ -64,7 +61,6 @@
guava-collections
-
src/main/resources
@@ -77,7 +73,6 @@
4.1
0.9.12
-
3.6.1
2.0.0.0
diff --git a/guava-modules/guava-core/pom.xml b/guava-modules/guava-core/pom.xml
index 5224148cb8..a15dfb5178 100644
--- a/guava-modules/guava-core/pom.xml
+++ b/guava-modules/guava-core/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -31,7 +30,7 @@
- guava
+ guava-core
src/main/resources
@@ -45,4 +44,4 @@
3.6.1
-
+
\ No newline at end of file
diff --git a/guava-modules/guava-io/pom.xml b/guava-modules/guava-io/pom.xml
index b77bad575d..f6ebac8ba4 100644
--- a/guava-modules/guava-io/pom.xml
+++ b/guava-modules/guava-io/pom.xml
@@ -1,12 +1,10 @@
-
+
4.0.0
guava-io
0.1.0-SNAPSHOT
-
- 5.6.2
-
guava-io
@@ -33,7 +31,6 @@
guava-io
-
src/main/resources
@@ -42,4 +39,8 @@
+
+ 5.6.2
+
+
\ No newline at end of file
diff --git a/guava-modules/guava-utilities/pom.xml b/guava-modules/guava-utilities/pom.xml
index fd9523c224..a9aca0ee08 100644
--- a/guava-modules/guava-utilities/pom.xml
+++ b/guava-modules/guava-utilities/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -21,7 +20,6 @@
commons-lang3
${commons-lang3.version}
-
org.junit.jupiter
@@ -44,8 +42,7 @@
- guava
-
+ guava-utilities
src/main/resources
diff --git a/guava-modules/pom.xml b/guava-modules/pom.xml
index 4b84f616f3..957b8ad166 100644
--- a/guava-modules/pom.xml
+++ b/guava-modules/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
guava-modules
guava-modules
@@ -52,4 +53,4 @@
29.0-jre
-
+
\ No newline at end of file
diff --git a/guice/pom.xml b/guice/pom.xml
index 6bbad6dddc..2d968cdfc7 100644
--- a/guice/pom.xml
+++ b/guice/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
diff --git a/hazelcast/pom.xml b/hazelcast/pom.xml
index 69444308a3..694563790f 100644
--- a/hazelcast/pom.xml
+++ b/hazelcast/pom.xml
@@ -1,8 +1,7 @@
-
+
4.0.0
hazelcast
0.0.1-SNAPSHOT
diff --git a/helidon/helidon-mp/pom.xml b/helidon/helidon-mp/pom.xml
index 38187a5cb8..3e61d05f61 100644
--- a/helidon/helidon-mp/pom.xml
+++ b/helidon/helidon-mp/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
helidon-mp
helidon-mp
@@ -29,4 +30,4 @@
2.26
-
+
\ No newline at end of file
diff --git a/helidon/helidon-se/pom.xml b/helidon/helidon-se/pom.xml
index d5592dfb7b..e26390a99d 100644
--- a/helidon/helidon-se/pom.xml
+++ b/helidon/helidon-se/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
helidon-se
helidon-se
@@ -13,14 +13,13 @@
-
+
io.helidon.config
helidon-config-yaml
${helidon.version}
-
-
+
io.helidon.webserver
helidon-webserver
@@ -37,8 +36,7 @@
helidon-webserver-json
${helidon.version}
-
-
+
io.helidon.security
helidon-security
diff --git a/helidon/pom.xml b/helidon/pom.xml
index 85bab4db42..36466203a8 100644
--- a/helidon/pom.xml
+++ b/helidon/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.helidon
helidon
@@ -18,4 +19,4 @@
helidon-mp
-
+
\ No newline at end of file
diff --git a/httpclient-2/pom.xml b/httpclient-2/pom.xml
index 7638c692dc..881b0407c3 100644
--- a/httpclient-2/pom.xml
+++ b/httpclient-2/pom.xml
@@ -26,7 +26,6 @@
-
org.springframework.boot
diff --git a/httpclient-simple/pom.xml b/httpclient-simple/pom.xml
index 019f1af856..84b41cdd6c 100644
--- a/httpclient-simple/pom.xml
+++ b/httpclient-simple/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
httpclient-simple
0.1-SNAPSHOT
@@ -15,9 +16,7 @@
-
-
org.springframework.security
spring-security-web
@@ -28,9 +27,7 @@
spring-security-config
${spring-security.version}
-
-
org.springframework
spring-core
@@ -72,7 +69,6 @@
spring-expression
${spring.version}
-
org.springframework
spring-web
@@ -83,21 +79,17 @@
spring-webmvc
${spring.version}
-
org.springframework
spring-oxm
${spring.version}
-
-
com.fasterxml.jackson.core
jackson-databind
${jackson.version}
-
org.apache.httpcomponents
httpcore
@@ -109,7 +101,6 @@
-
org.apache.commons
@@ -166,33 +157,26 @@
${wiremock.version}
test
-
-
javax.servlet
javax.servlet-api
${javax.servlet-api.version}
provided
-
javax.servlet
jstl
${jstl.version}
runtime
-
-
com.google.guava
guava
${guava.version}
-
-
org.springframework
spring-test
@@ -209,7 +193,6 @@
true
-
org.apache.maven.plugins
@@ -264,7 +247,6 @@
-
org.apache.maven.plugins
maven-surefire-plugin
@@ -288,7 +270,6 @@
-
@@ -302,7 +283,7 @@
2.5.1
4.4.11
- 4.5.8
+ 4.5.8
1.6.1
diff --git a/httpclient/pom.xml b/httpclient/pom.xml
index 606e9ed793..a1627cb6fa 100644
--- a/httpclient/pom.xml
+++ b/httpclient/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
httpclient
0.1-SNAPSHOT
diff --git a/hystrix/pom.xml b/hystrix/pom.xml
index 1cf8713b91..639d4eba02 100644
--- a/hystrix/pom.xml
+++ b/hystrix/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
hystrix
1.0
@@ -57,4 +58,4 @@
1.5.8
-
+
\ No newline at end of file
diff --git a/image-processing/pom.xml b/image-processing/pom.xml
index f2551598d5..ea218356ce 100644
--- a/image-processing/pom.xml
+++ b/image-processing/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
image-processing
1.0-SNAPSHOT
@@ -75,14 +76,14 @@
marvin
${marvin-version}
pom
-
+
com.github.downgoon
MarvinPlugins
${marvin-version}
-
+
1.3.5
1.51h
diff --git a/immutables/pom.xml b/immutables/pom.xml
index af4a62ea6b..648166fd74 100644
--- a/immutables/pom.xml
+++ b/immutables/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
immutables
immutables
diff --git a/jackson-modules/jackson-annotations/pom.xml b/jackson-modules/jackson-annotations/pom.xml
index e4a41a5825..bdc131c867 100644
--- a/jackson-modules/jackson-annotations/pom.xml
+++ b/jackson-modules/jackson-annotations/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson-annotations
0.0.1-SNAPSHOT
@@ -47,4 +48,4 @@
3.1.1
-
+
\ No newline at end of file
diff --git a/jackson-modules/jackson-conversions-2/pom.xml b/jackson-modules/jackson-conversions-2/pom.xml
index 992cff30b2..799fcb106a 100644
--- a/jackson-modules/jackson-conversions-2/pom.xml
+++ b/jackson-modules/jackson-conversions-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson-conversions-2
0.0.1-SNAPSHOT
@@ -54,4 +55,4 @@
2.9.8
-
+
\ No newline at end of file
diff --git a/jackson-modules/jackson-conversions/pom.xml b/jackson-modules/jackson-conversions/pom.xml
index fafb731cc9..9218f209ac 100644
--- a/jackson-modules/jackson-conversions/pom.xml
+++ b/jackson-modules/jackson-conversions/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson-conversions
0.0.1-SNAPSHOT
@@ -35,4 +36,4 @@
-
+
\ No newline at end of file
diff --git a/jackson-modules/jackson-custom-conversions/pom.xml b/jackson-modules/jackson-custom-conversions/pom.xml
index f58b25781c..79af962eec 100644
--- a/jackson-modules/jackson-custom-conversions/pom.xml
+++ b/jackson-modules/jackson-custom-conversions/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson-custom-conversions
0.0.1-SNAPSHOT
@@ -28,8 +29,6 @@
jackson-core
${jackson.version}
-
-
@@ -42,4 +41,4 @@
-
+
\ No newline at end of file
diff --git a/jackson-modules/jackson-exceptions/pom.xml b/jackson-modules/jackson-exceptions/pom.xml
index 1a52892523..a24a0ab4b7 100644
--- a/jackson-modules/jackson-exceptions/pom.xml
+++ b/jackson-modules/jackson-exceptions/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson-exceptions
0.0.1-SNAPSHOT
@@ -22,4 +23,4 @@
-
+
\ No newline at end of file
diff --git a/jackson-modules/jackson/pom.xml b/jackson-modules/jackson/pom.xml
index 615076fc93..a4aecfa3de 100644
--- a/jackson-modules/jackson/pom.xml
+++ b/jackson-modules/jackson/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson
0.0.1-SNAPSHOT
@@ -19,41 +20,34 @@
jackson-datatype-jsr310
${jackson.version}
-
com.fasterxml.jackson.datatype
jackson-datatype-joda
${jackson.version}
-
com.fasterxml.jackson.module
jackson-module-jsonSchema
${jackson.version}
-
com.fasterxml.jackson.datatype
jackson-datatype-jdk8
${jackson.version}
-
-
io.rest-assured
json-schema-validator
${rest-assured.version}
test
-
io.rest-assured
json-path
${rest-assured.version}
test
-
org.assertj
assertj-core
@@ -78,4 +72,4 @@
3.11.0
-
+
\ No newline at end of file
diff --git a/jackson-modules/pom.xml b/jackson-modules/pom.xml
index 819f11c110..3d9d83553e 100644
--- a/jackson-modules/pom.xml
+++ b/jackson-modules/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jackson-modules
jackson-modules
@@ -35,7 +35,6 @@
jackson-dataformat-xml
${jackson.version}
-
org.junit.jupiter
junit-jupiter
@@ -53,4 +52,5 @@
5.6.2
+
\ No newline at end of file
diff --git a/jackson-simple/pom.xml b/jackson-simple/pom.xml
index 8dfd949166..204954ce60 100644
--- a/jackson-simple/pom.xml
+++ b/jackson-simple/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jackson-simple
0.0.1-SNAPSHOT
@@ -20,7 +21,6 @@
jackson-dataformat-xml
${jackson.version}
-
org.junit.jupiter
@@ -44,7 +44,6 @@
jackson-simple
-
src/main/resources
@@ -59,4 +58,4 @@
3.11.0
-
+
\ No newline at end of file
diff --git a/java-blockchain/pom.xml b/java-blockchain/pom.xml
index 3100fed7b9..6d3910df80 100644
--- a/java-blockchain/pom.xml
+++ b/java-blockchain/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.blockchain
java-blockchain
diff --git a/java-collections-conversions-2/pom.xml b/java-collections-conversions-2/pom.xml
index 23f20276a3..7845e0d934 100644
--- a/java-collections-conversions-2/pom.xml
+++ b/java-collections-conversions-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-collections-conversions-2
0.1.0-SNAPSHOT
@@ -55,4 +56,4 @@
-
+
\ No newline at end of file
diff --git a/java-collections-conversions/pom.xml b/java-collections-conversions/pom.xml
index 2073640372..92fc66b480 100644
--- a/java-collections-conversions/pom.xml
+++ b/java-collections-conversions/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-collections-conversions
0.1.0-SNAPSHOT
@@ -40,4 +41,5 @@
4.1
-
+
+
\ No newline at end of file
diff --git a/java-collections-maps-3/pom.xml b/java-collections-maps-3/pom.xml
index 3888623a7f..37a0f617d0 100644
--- a/java-collections-maps-3/pom.xml
+++ b/java-collections-maps-3/pom.xml
@@ -1,7 +1,13 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ java-collections-maps-3
+ 0.1.0-SNAPSHOT
+ java-collections-maps-3
+ jar
+
com.baeldung
parent-java
@@ -9,12 +15,6 @@
../parent-java
- 4.0.0
- java-collections-maps-3
- 0.1.0-SNAPSHOT
- java-collections-maps-3
- jar
-
org.springframework
@@ -28,11 +28,11 @@
${assertj.version}
test
-
- org.apache.commons
- commons-collections4
- ${commons-collections4.version}
-
+
+ org.apache.commons
+ commons-collections4
+ ${commons-collections4.version}
+
@@ -40,4 +40,4 @@
3.6.1
5.2.5.RELEASE
-
+
\ No newline at end of file
diff --git a/java-ee-8-security-api/app-auth-basic-store-db/pom.xml b/java-ee-8-security-api/app-auth-basic-store-db/pom.xml
index 02e3b04a40..7307f144a7 100644
--- a/java-ee-8-security-api/app-auth-basic-store-db/pom.xml
+++ b/java-ee-8-security-api/app-auth-basic-store-db/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
app-auth-basic-store-db
app-auth-basic-store-db
@@ -65,4 +66,4 @@
-
+
\ No newline at end of file
diff --git a/java-ee-8-security-api/app-auth-custom-form-store-custom/pom.xml b/java-ee-8-security-api/app-auth-custom-form-store-custom/pom.xml
index 9354782999..729b426049 100644
--- a/java-ee-8-security-api/app-auth-custom-form-store-custom/pom.xml
+++ b/java-ee-8-security-api/app-auth-custom-form-store-custom/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
app-auth-custom-form-store-custom
app-auth-custom-form-store-custom
@@ -39,4 +40,4 @@
-
+
\ No newline at end of file
diff --git a/java-ee-8-security-api/app-auth-custom-no-store/pom.xml b/java-ee-8-security-api/app-auth-custom-no-store/pom.xml
index fee665e22d..da6ed0a1a5 100644
--- a/java-ee-8-security-api/app-auth-custom-no-store/pom.xml
+++ b/java-ee-8-security-api/app-auth-custom-no-store/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
app-auth-custom-no-store
app-auth-custom-no-store
@@ -65,4 +66,4 @@
-
+
\ No newline at end of file
diff --git a/java-ee-8-security-api/app-auth-form-store-ldap/pom.xml b/java-ee-8-security-api/app-auth-form-store-ldap/pom.xml
index f8d19b5750..1dea82992c 100644
--- a/java-ee-8-security-api/app-auth-form-store-ldap/pom.xml
+++ b/java-ee-8-security-api/app-auth-form-store-ldap/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -53,4 +52,4 @@
4.0.4
-
+
\ No newline at end of file
diff --git a/java-ee-8-security-api/pom.xml b/java-ee-8-security-api/pom.xml
index 5eeebcb6f0..c01bedbeee 100644
--- a/java-ee-8-security-api/pom.xml
+++ b/java-ee-8-security-api/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
java-ee-8-security-api
1.0-SNAPSHOT
@@ -71,4 +71,4 @@
18.0.0.1
-
+
\ No newline at end of file
diff --git a/java-native/pom.xml b/java-native/pom.xml
index 29fc13b8d8..95cb24bd98 100644
--- a/java-native/pom.xml
+++ b/java-native/pom.xml
@@ -12,10 +12,6 @@
1.0.0-SNAPSHOT
-
- 5.6.0
-
-
net.java.dev.jna
@@ -23,7 +19,7 @@
${jna.version}
-
+
@@ -36,4 +32,9 @@
+
+
+ 5.6.0
+
+
\ No newline at end of file
diff --git a/java-numbers-2/pom.xml b/java-numbers-2/pom.xml
index 5c81b00756..466d040b13 100644
--- a/java-numbers-2/pom.xml
+++ b/java-numbers-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
java-numbers-2
0.1.0-SNAPSHOT
@@ -42,4 +42,4 @@
2.6.0
-
+
\ No newline at end of file
diff --git a/java-numbers-3/pom.xml b/java-numbers-3/pom.xml
index 62225a898f..e8e080c4c0 100644
--- a/java-numbers-3/pom.xml
+++ b/java-numbers-3/pom.xml
@@ -54,4 +54,4 @@
3.6.1
-
+
\ No newline at end of file
diff --git a/java-numbers-4/pom.xml b/java-numbers-4/pom.xml
index f4b0e23bd7..dbd6ac456a 100644
--- a/java-numbers-4/pom.xml
+++ b/java-numbers-4/pom.xml
@@ -48,4 +48,4 @@
3.6.1
-
+
\ No newline at end of file
diff --git a/java-numbers/pom.xml b/java-numbers/pom.xml
index fc904c5747..8bab655f73 100644
--- a/java-numbers/pom.xml
+++ b/java-numbers/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
java-numbers
0.1.0-SNAPSHOT
@@ -54,4 +54,4 @@
3.6.1
-
+
\ No newline at end of file
diff --git a/java-rmi/pom.xml b/java-rmi/pom.xml
index 5fa3ac8845..fee5107423 100644
--- a/java-rmi/pom.xml
+++ b/java-rmi/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.rmi
java-rmi
@@ -14,4 +15,4 @@
1.0.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/java-spi/exchange-rate-api/pom.xml b/java-spi/exchange-rate-api/pom.xml
index 1630dbf699..8067175cac 100644
--- a/java-spi/exchange-rate-api/pom.xml
+++ b/java-spi/exchange-rate-api/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
exchange-rate-api
exchange-rate-api
@@ -12,4 +13,4 @@
1.0.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/java-spi/exchange-rate-app/pom.xml b/java-spi/exchange-rate-app/pom.xml
index fea9ebe8d9..fbf87eb026 100644
--- a/java-spi/exchange-rate-app/pom.xml
+++ b/java-spi/exchange-rate-app/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
exchange-rate-app
exchange-rate-app
@@ -24,4 +25,4 @@
1.0.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/java-spi/exchange-rate-impl/pom.xml b/java-spi/exchange-rate-impl/pom.xml
index 553a9e3377..254a8bb809 100644
--- a/java-spi/exchange-rate-impl/pom.xml
+++ b/java-spi/exchange-rate-impl/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
exchange-rate-impl
exchange-rate-impl
@@ -71,4 +72,4 @@
3.1.0
-
+
\ No newline at end of file
diff --git a/java-spi/pom.xml b/java-spi/pom.xml
index 6d4874083d..fac6409b9f 100644
--- a/java-spi/pom.xml
+++ b/java-spi/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-spi
java-spi
@@ -18,4 +19,4 @@
exchange-rate-app
-
+
\ No newline at end of file
diff --git a/java-vavr-stream/pom.xml b/java-vavr-stream/pom.xml
index 94520f299d..8358c29003 100644
--- a/java-vavr-stream/pom.xml
+++ b/java-vavr-stream/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.samples
java-vavr-stream
diff --git a/java-websocket/pom.xml b/java-websocket/pom.xml
index ddf10c4457..ffc2b0631e 100644
--- a/java-websocket/pom.xml
+++ b/java-websocket/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-websocket
0.0.1-SNAPSHOT
@@ -32,4 +33,4 @@
2.8.0
-
+
\ No newline at end of file
diff --git a/javafx/pom.xml b/javafx/pom.xml
index 50b9e7135c..9b0b6002a8 100644
--- a/javafx/pom.xml
+++ b/javafx/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
javafx
javafx
diff --git a/javax-servlets/pom.xml b/javax-servlets/pom.xml
index 700b823a6e..f1677050cf 100644
--- a/javax-servlets/pom.xml
+++ b/javax-servlets/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.javax-servlets
javax-servlets
@@ -21,21 +22,18 @@
${assertj.version}
test
-
commons-fileupload
commons-fileupload
${commons-fileupload.version}
-
javax.servlet
javax.servlet-api
${javax.servlet-api.version}
-
org.apache.httpcomponents
httpclient
@@ -62,4 +60,4 @@
4.0.1
-
+
\ No newline at end of file
diff --git a/javaxval/pom.xml b/javaxval/pom.xml
index 2655d1fe3e..d684e9dfe2 100644
--- a/javaxval/pom.xml
+++ b/javaxval/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
javaxval
0.1-SNAPSHOT
@@ -47,4 +48,4 @@
5.0.2.RELEASE
3.11.1
-
+
\ No newline at end of file
diff --git a/javaxval/src/test/java/com/baeldung/javaxval/bigdecimal/InvoiceUnitTest.java b/javaxval/src/test/java/com/baeldung/javaxval/bigdecimal/InvoiceUnitTest.java
index 2df0cf81af..801d7966a5 100644
--- a/javaxval/src/test/java/com/baeldung/javaxval/bigdecimal/InvoiceUnitTest.java
+++ b/javaxval/src/test/java/com/baeldung/javaxval/bigdecimal/InvoiceUnitTest.java
@@ -1,18 +1,17 @@
package com.baeldung.javaxval.bigdecimal;
-import static org.assertj.core.api.Assertions.assertThat;
-
-import java.math.BigDecimal;
-import java.util.Set;
-
-import javax.validation.ConstraintViolation;
-import javax.validation.Validation;
-import javax.validation.Validator;
-
import com.baeldung.javaxval.LocaleAwareUnitTest;
import org.junit.BeforeClass;
import org.junit.Test;
+import javax.validation.ConstraintViolation;
+import javax.validation.Validation;
+import javax.validation.Validator;
+import java.math.BigDecimal;
+import java.util.Set;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
public class InvoiceUnitTest extends LocaleAwareUnitTest {
private static Validator validator;
@@ -24,41 +23,67 @@ public class InvoiceUnitTest extends LocaleAwareUnitTest {
}
@Test
- public void whenPriceIntegerDigitLessThanThreeWithDecimalValue_thenShouldGiveConstraintViolations() {
- Invoice invoice = new Invoice(new BigDecimal(10.21), "Book purchased");
+ public void whenLessThanThreeIntegerDigits_thenShouldNotGiveConstraintViolations() {
+ Invoice invoice = new Invoice(new BigDecimal("10.21"), "Book purchased");
Set> violations = validator.validate(invoice);
- assertThat(violations.size()).isEqualTo(1);
- violations.forEach(action -> assertThat(action.getMessage()).isEqualTo("numeric value out of bounds (<3 digits>.<2 digits> expected)"));
+ assertThat(violations).isEmpty();
}
@Test
- public void whenPriceIntegerDigitLessThanThreeWithIntegerValue_thenShouldNotGiveConstraintViolations() {
- Invoice invoice = new Invoice(new BigDecimal(10), "Book purchased");
+ public void whenThreeIntegerDigits_thenShouldNotGiveConstraintViolations() {
+ Invoice invoice = new Invoice(new BigDecimal("102.21"), "Book purchased");
Set> violations = validator.validate(invoice);
- assertThat(violations.size()).isEqualTo(0);
+ assertThat(violations).isEmpty();
}
@Test
- public void whenPriceIntegerDigitGreaterThanThree_thenShouldGiveConstraintViolations() {
- Invoice invoice = new Invoice(new BigDecimal(1021.21), "Book purchased");
+ public void whenMoreThanThreeIntegerDigits_thenShouldGiveConstraintViolations() {
+ Invoice invoice = new Invoice(new BigDecimal("1021.21"), "Book purchased");
Set> violations = validator.validate(invoice);
- assertThat(violations.size()).isEqualTo(1);
- violations.forEach(action -> assertThat(action.getMessage()).isEqualTo("numeric value out of bounds (<3 digits>.<2 digits> expected)"));
+ assertThat(violations).hasSize(1);
+ assertThat(violations)
+ .extracting("message")
+ .containsOnly("numeric value out of bounds (<3 digits>.<2 digits> expected)");
+ }
+
+ @Test
+ public void whenLessThanTwoFractionDigits_thenShouldNotGiveConstraintViolations() {
+ Invoice invoice = new Invoice(new BigDecimal("99.9"), "Book purchased");
+ Set> violations = validator.validate(invoice);
+ assertThat(violations).isEmpty();
+ }
+
+ @Test
+ public void whenTwoFractionDigits_thenShouldNotGiveConstraintViolations() {
+ Invoice invoice = new Invoice(new BigDecimal("99.99"), "Book purchased");
+ Set> violations = validator.validate(invoice);
+ assertThat(violations).isEmpty();
+ }
+
+ @Test
+ public void whenMoreThanTwoFractionDigits_thenShouldGiveConstraintViolations() {
+ Invoice invoice = new Invoice(new BigDecimal("99.999"), "Book purchased");
+ Set> violations = validator.validate(invoice);
+ assertThat(violations).hasSize(1);
+ assertThat(violations)
+ .extracting("message")
+ .containsOnly("numeric value out of bounds (<3 digits>.<2 digits> expected)");
}
@Test
public void whenPriceIsZero_thenShouldGiveConstraintViolations() {
- Invoice invoice = new Invoice(new BigDecimal(000.00), "Book purchased");
+ Invoice invoice = new Invoice(new BigDecimal("0.00"), "Book purchased");
Set> violations = validator.validate(invoice);
- assertThat(violations.size()).isEqualTo(1);
- violations.forEach(action -> assertThat(action.getMessage()).isEqualTo("must be greater than 0.0"));
+ assertThat(violations).hasSize(1);
+ assertThat(violations)
+ .extracting("message")
+ .containsOnly("must be greater than 0.0");
}
@Test
public void whenPriceIsGreaterThanZero_thenShouldNotGiveConstraintViolations() {
- Invoice invoice = new Invoice(new BigDecimal(100.50), "Book purchased");
+ Invoice invoice = new Invoice(new BigDecimal("100.50"), "Book purchased");
Set> violations = validator.validate(invoice);
- assertThat(violations.size()).isEqualTo(0);
+ assertThat(violations).isEmpty();
}
-
}
diff --git a/jaxb/pom.xml b/jaxb/pom.xml
index dc13cf75bc..183f7f13cb 100644
--- a/jaxb/pom.xml
+++ b/jaxb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jaxb
0.0.1-SNAPSHOT
@@ -34,7 +35,6 @@
true
-
@@ -55,7 +55,7 @@
-
+
@@ -64,9 +64,7 @@
-
-
org.codehaus.mojo
diff --git a/jee-7-security/pom.xml b/jee-7-security/pom.xml
index e47df7aae9..a8ceee8704 100644
--- a/jee-7-security/pom.xml
+++ b/jee-7-security/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jee-7-security
1.0-SNAPSHOT
@@ -58,4 +59,4 @@
1.0-pr
-
+
\ No newline at end of file
diff --git a/jee-7/pom.xml b/jee-7/pom.xml
index 48814e6d2f..b68c8b9801 100644
--- a/jee-7/pom.xml
+++ b/jee-7/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jee-7
1.0-SNAPSHOT
@@ -41,7 +41,6 @@
${javaee_api.version}
provided
-
org.jboss.arquillian.junit
arquillian-junit-container
@@ -60,14 +59,12 @@
${awaitility.version}
test
-
org.jboss.shrinkwrap.resolver
shrinkwrap-resolver-impl-maven
test
jar
-
org.jboss.shrinkwrap.resolver
shrinkwrap-resolver-impl-maven-archive
@@ -114,7 +111,6 @@
standard
${taglibs.standard.version}
-
javax.mvc
javax.mvc-api
@@ -125,13 +121,11 @@
ozark
${ozark.version}
-
org.springframework.security
spring-security-web
${org.springframework.security.version}
-
org.springframework.security
spring-security-config
@@ -143,7 +137,6 @@
${org.springframework.security.version}
-
org.jboss.spec.javax.batch
jboss-batch-api_1.0_spec
@@ -210,8 +203,8 @@
-
+
org.eclipse.m2e
lifecycle-mapping
@@ -242,7 +235,7 @@
-
+
org.codehaus.mojo
jaxws-maven-plugin
@@ -539,4 +532,4 @@
2.22.1
-
+
\ No newline at end of file
diff --git a/jersey/pom.xml b/jersey/pom.xml
index 065e2230a2..9f57179065 100644
--- a/jersey/pom.xml
+++ b/jersey/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jersey
0.0.1-SNAPSHOT
@@ -97,4 +98,4 @@
2.26
-
+
\ No newline at end of file
diff --git a/jgit/pom.xml b/jgit/pom.xml
index d960843868..ca58709583 100644
--- a/jgit/pom.xml
+++ b/jgit/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jgit
1.0-SNAPSHOT
diff --git a/jgroups/pom.xml b/jgroups/pom.xml
index 494de2fb4f..370d8a349a 100644
--- a/jgroups/pom.xml
+++ b/jgroups/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jgroups
0.1-SNAPSHOT
@@ -31,4 +32,4 @@
4.0.10.Final
-
+
\ No newline at end of file
diff --git a/jib/pom.xml b/jib/pom.xml
index 15e7e44e7c..8208eebdf7 100644
--- a/jib/pom.xml
+++ b/jib/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jib
0.1-SNAPSHOT
@@ -42,4 +43,4 @@
2.5.0
-
+
\ No newline at end of file
diff --git a/jjwt/pom.xml b/jjwt/pom.xml
index 9d38d1b0e9..4c194f9285 100644
--- a/jjwt/pom.xml
+++ b/jjwt/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
io.jsonwebtoken
jjwt
@@ -20,28 +21,23 @@
org.springframework.boot
spring-boot-devtools
-
org.springframework.boot
spring-boot-starter-thymeleaf
-
org.springframework.boot
spring-boot-starter-security
-
org.springframework.boot
spring-boot-starter-web
-
io.jsonwebtoken
jjwt
${jjwt.version}
-
org.assertj
assertj-core
@@ -53,4 +49,4 @@
0.7.0
-
+
\ No newline at end of file
diff --git a/jmeter/pom.xml b/jmeter/pom.xml
index e2830baef5..199d95e0d6 100644
--- a/jmeter/pom.xml
+++ b/jmeter/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jmeter
jmeter
@@ -40,7 +41,6 @@
org.springframework.boot
spring-boot-maven-plugin
-
com.lazerycode.jmeter
jmeter-maven-plugin
@@ -65,4 +65,4 @@
2.6.0
-
+
\ No newline at end of file
diff --git a/jmh/pom.xml b/jmh/pom.xml
index ecee66f410..61f62efd5a 100644
--- a/jmh/pom.xml
+++ b/jmh/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jmh
1.0-SNAPSHOT
@@ -47,7 +48,6 @@
-
org.apache.maven.plugins
maven-assembly-plugin
diff --git a/jooby/pom.xml b/jooby/pom.xml
index fe26f9a4c6..f972a22e9c 100644
--- a/jooby/pom.xml
+++ b/jooby/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.jooby
jooby
@@ -60,4 +61,4 @@
2.4.3
-
+
\ No newline at end of file
diff --git a/jsf/pom.xml b/jsf/pom.xml
index dc110b9fd5..88099ef9c4 100644
--- a/jsf/pom.xml
+++ b/jsf/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jsf
0.1-SNAPSHOT
@@ -66,7 +67,6 @@
4.3.4.RELEASE
-
2.2.14
3.0.0
diff --git a/json-2/pom.xml b/json-2/pom.xml
index e27d1c83f6..fbae40b6a3 100644
--- a/json-2/pom.xml
+++ b/json-2/pom.xml
@@ -1,7 +1,8 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
com.baeldung
json-2
0.0.1-SNAPSHOT
@@ -11,7 +12,6 @@
com.baeldung
1.0.0-SNAPSHOT
- 4.0.0
@@ -19,21 +19,18 @@
jsoniter
${jsoniter.version}
-
junit
junit
${junit.version}
test
-
org.assertj
assertj-core
${assertj-core.version}
test
-
com.squareup.moshi
moshi
@@ -110,46 +107,50 @@
+
+
+
+
+
+
+ org.eclipse.m2e
+ lifecycle-mapping
+ 1.0.0
+
+
+
+
+
+
+ org.apache.maven.plugins
+
+
+ maven-pmd-plugin
+
+
+ [3.13.0,)
+
+
+ check
+
+
+
+
+
+
+
+
+
+
+
+
+
+
0.9.23
3.11.1
1.9.2
-
-
-
-
-
- org.eclipse.m2e
- lifecycle-mapping
- 1.0.0
-
-
-
-
-
-
- org.apache.maven.plugins
-
-
- maven-pmd-plugin
-
-
- [3.13.0,)
-
-
- check
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
\ No newline at end of file
diff --git a/json-path/pom.xml b/json-path/pom.xml
index 8756ffee7b..b4577ec15f 100644
--- a/json-path/pom.xml
+++ b/json-path/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
json-path
0.0.1-SNAPSHOT
@@ -25,4 +26,5 @@
2.4.0
+
\ No newline at end of file
diff --git a/json/pom.xml b/json/pom.xml
index bd901b526e..260b2d1ad9 100644
--- a/json/pom.xml
+++ b/json/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
org.baeldung
json
@@ -87,4 +88,4 @@
3.11.1
-
+
\ No newline at end of file
diff --git a/jsoup/pom.xml b/jsoup/pom.xml
index d2b59476f3..44f8f996f5 100644
--- a/jsoup/pom.xml
+++ b/jsoup/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jsoup
jsoup
@@ -24,4 +25,4 @@
1.10.2
-
+
\ No newline at end of file
diff --git a/jta/pom.xml b/jta/pom.xml
index 8f90f74d43..b8b5570226 100644
--- a/jta/pom.xml
+++ b/jta/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jta
1.0-SNAPSHOT
@@ -35,4 +36,4 @@
-
+
\ No newline at end of file
diff --git a/kubernetes/k8s-intro/README.md b/kubernetes/k8s-intro/README.md
index 83cbcca4db..6ac593452c 100644
--- a/kubernetes/k8s-intro/README.md
+++ b/kubernetes/k8s-intro/README.md
@@ -16,3 +16,4 @@ If you get a valid response, then you're good to go.
- [Paging and Async Calls with the Kubernetes API](https://www.baeldung.com/java-kubernetes-paging-async)
- [Using Watch with the Kubernetes API](https://www.baeldung.com/java-kubernetes-watch)
+- [Using Namespaces and Selectors With the Kubernetes Java API](https://www.baeldung.com/java-kubernetes-namespaces-selectors)
diff --git a/kubernetes/k8s-intro/pom.xml b/kubernetes/k8s-intro/pom.xml
index 5b4867d0df..61722cb2c8 100644
--- a/kubernetes/k8s-intro/pom.xml
+++ b/kubernetes/k8s-intro/pom.xml
@@ -2,13 +2,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ k8s-intro
+ 0.0.1-SNAPSHOT
+
com.baeldung
kubernetes
1.0.0-SNAPSHOT
- k8s-intro
- 0.0.1-SNAPSHOT
@@ -16,7 +17,6 @@
client-java
11.0.0
-
ch.qos.logback
logback-classic
@@ -38,4 +38,5 @@
+
\ No newline at end of file
diff --git a/kubernetes/pom.xml b/kubernetes/pom.xml
index aea3dea47e..72cb1577a4 100644
--- a/kubernetes/pom.xml
+++ b/kubernetes/pom.xml
@@ -1,12 +1,16 @@
-
+
4.0.0
+ kubernetes
+ pom
+
com.baeldung
parent-modules
1.0.0-SNAPSHOT
- kubernetes
- pom
+
k8s-intro
diff --git a/language-interop/pom.xml b/language-interop/pom.xml
index bdf872a076..f2b0a08969 100644
--- a/language-interop/pom.xml
+++ b/language-interop/pom.xml
@@ -52,4 +52,4 @@
3.6.1
-
+
\ No newline at end of file
diff --git a/libraries-2/pom.xml b/libraries-2/pom.xml
index 3aa36c3f90..28a7fb62fd 100644
--- a/libraries-2/pom.xml
+++ b/libraries-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-2
libraries-2
@@ -75,7 +75,6 @@
-
edu.uci.ics
crawler4j
@@ -136,4 +135,4 @@
2.5.0
-
+
\ No newline at end of file
diff --git a/libraries-3/pom.xml b/libraries-3/pom.xml
index 3d3b5db890..079628ffaa 100644
--- a/libraries-3/pom.xml
+++ b/libraries-3/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-3
libraries-3
@@ -70,7 +70,7 @@
velocity-engine-core
${velocity-engine-core.version}
-
+
com.uber.nullaway
nullaway
${nullaway.version}
@@ -80,8 +80,7 @@
plexus-compiler-javac-errorprone
${plexus-compiler.version}
-
+
com.google.errorprone
error_prone_core
@@ -123,7 +122,7 @@
-
+
org.apache.maven.plugins
maven-compiler-plugin
3.5
@@ -141,7 +140,8 @@
-
+
-XepExcludedPaths:(.*)/test/.*|(.*)/jcabi/.*
-XepOpt:NullAway:AnnotatedPackages=com.baeldung.nullaway
@@ -153,8 +153,8 @@
plexus-compiler-javac-errorprone
2.8
-
+
com.google.errorprone
error_prone_core
@@ -170,7 +170,7 @@
-
+
reload
@@ -210,11 +210,10 @@
-
+
1.78
1.18.6
-
0.43
2.7.2
1.2.3.Final
@@ -223,7 +222,6 @@
0.14.1
1.9.2
1.9.2
-
1.19
4.4.13
4.5.12
@@ -232,4 +230,4 @@
2.8
2.1.3
-
+
\ No newline at end of file
diff --git a/libraries-4/pom.xml b/libraries-4/pom.xml
index d7f6a44985..decd467de9 100644
--- a/libraries-4/pom.xml
+++ b/libraries-4/pom.xml
@@ -1,15 +1,15 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ libraries-4
+
parent-modules
com.baeldung
1.0.0-SNAPSHOT
- 4.0.0
-
- libraries-4
diff --git a/libraries-5/pom.xml b/libraries-5/pom.xml
index c0de1af822..ff6c208f5f 100644
--- a/libraries-5/pom.xml
+++ b/libraries-5/pom.xml
@@ -1,16 +1,16 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ libraries-5
+
parent-modules
com.baeldung
1.0.0-SNAPSHOT
- libraries-5
- 4.0.0
-
org.springframework
@@ -33,7 +33,6 @@
${pact.version}
test
-
com.typesafe.akka
@@ -45,7 +44,6 @@
akka-testkit_${scala.version}
${typesafe-akka.version}
test
-
one.util
@@ -62,7 +60,6 @@
byte-buddy-agent
${byte-buddy.version}
-
com.github.docker-java
@@ -84,7 +81,6 @@
-
com.github.ben-manes.caffeine
caffeine
diff --git a/libraries-6/pom.xml b/libraries-6/pom.xml
index caaebbb922..6db3b1b77b 100644
--- a/libraries-6/pom.xml
+++ b/libraries-6/pom.xml
@@ -1,15 +1,15 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ libraries-6
+
parent-modules
com.baeldung
1.0.0-SNAPSHOT
- 4.0.0
-
- libraries-6
@@ -164,5 +164,4 @@
8.12.9
-
\ No newline at end of file
diff --git a/libraries-apache-commons-collections/pom.xml b/libraries-apache-commons-collections/pom.xml
index 2209874c66..e2805552e3 100644
--- a/libraries-apache-commons-collections/pom.xml
+++ b/libraries-apache-commons-collections/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
libraries-apache-commons-collections
libraries-apache-commons-collections
@@ -37,4 +38,4 @@
2.0.0.0
-
+
\ No newline at end of file
diff --git a/libraries-apache-commons-io/pom.xml b/libraries-apache-commons-io/pom.xml
index 21f3f16cd3..5d0ed20abf 100644
--- a/libraries-apache-commons-io/pom.xml
+++ b/libraries-apache-commons-io/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
libraries-apache-commons-io
libraries-apache-commons-io
@@ -28,4 +29,4 @@
1.4
-
+
\ No newline at end of file
diff --git a/libraries-apache-commons/pom.xml b/libraries-apache-commons/pom.xml
index 08dddac880..8fa55c1b0e 100644
--- a/libraries-apache-commons/pom.xml
+++ b/libraries-apache-commons/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
libraries-apache-commons
libraries-apache-commons
@@ -75,4 +76,4 @@
2.5
-
+
\ No newline at end of file
diff --git a/libraries-concurrency/pom.xml b/libraries-concurrency/pom.xml
index 66296d829f..d8f48a1959 100644
--- a/libraries-concurrency/pom.xml
+++ b/libraries-concurrency/pom.xml
@@ -54,14 +54,11 @@
-Dco.paralleluniverse.fibers.verifyInstrumentation=true
-
-javaagent:${co.paralleluniverse:quasar-core:jar}
-
-classpath
-
com.baeldung.quasar.App
@@ -81,4 +78,5 @@
0.8.0
+
\ No newline at end of file
diff --git a/libraries-data-2/pom.xml b/libraries-data-2/pom.xml
index 0154823cca..1feb3142ee 100644
--- a/libraries-data-2/pom.xml
+++ b/libraries-data-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-data-2
libraries-data-2
@@ -142,7 +142,7 @@
net.bytebuddy
byte-buddy
${byte-buddy.version}
- test
+ test
org.apache.kafka
@@ -168,7 +168,7 @@
0.1.0
1.0.3
9.1.5.Final
-
+
4.3.8.RELEASE
4.0.0
1.1.0
diff --git a/libraries-data-db/pom.xml b/libraries-data-db/pom.xml
index 01e078d18d..20119da8a2 100644
--- a/libraries-data-db/pom.xml
+++ b/libraries-data-db/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-data-db
libraries-data-db
@@ -84,7 +84,6 @@
-
io.debezium
@@ -107,38 +106,32 @@
debezium-connector-mysql
${debezium.version}
-
org.testcontainers
testcontainers
${testcontainers-version}
-
org.testcontainers
mysql
${testcontainers-version}
-
-
+
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-jpa
-
mysql
mysql-connector-java
-
-
+
org.projectlombok
lombok
@@ -161,16 +154,25 @@
-
-
-
+
+
+
-
-
+
+
-
+
@@ -181,7 +183,6 @@
reladomogen
${reladomo.version}
-
com.goldmansachs.reladomo
reladomo-gen-util
@@ -223,7 +224,6 @@
-
org.datanucleus
@@ -283,4 +283,4 @@
1.15.3
-
+
\ No newline at end of file
diff --git a/libraries-data-io/pom.xml b/libraries-data-io/pom.xml
index e15e188d10..58bfde9aa0 100644
--- a/libraries-data-io/pom.xml
+++ b/libraries-data-io/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-data-io
libraries-data-io
diff --git a/libraries-data/pom.xml b/libraries-data/pom.xml
index 5adb490e96..3c6bedba90 100644
--- a/libraries-data/pom.xml
+++ b/libraries-data/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
libraries-data
libraries-data
@@ -57,8 +58,7 @@
hazelcast
${hazelcast.version}
-
-
+
org.apache.crunch
crunch-core
@@ -70,7 +70,6 @@
${org.apache.hadoop.hadoop-client}
provided
-
commons-cli
commons-cli
@@ -179,4 +178,4 @@
1.6.0.1
-
+
\ No newline at end of file
diff --git a/libraries-http-2/README.md b/libraries-http-2/README.md
index f3fdf1becb..4085d98ea5 100644
--- a/libraries-http-2/README.md
+++ b/libraries-http-2/README.md
@@ -8,5 +8,6 @@ This module contains articles about HTTP libraries.
- [Decode an OkHttp JSON Response](https://www.baeldung.com/okhttp-json-response)
- [Retrofit 2 – Dynamic URL](https://www.baeldung.com/retrofit-dynamic-url)
- [Adding Interceptors in OkHTTP](https://www.baeldung.com/java-okhttp-interceptors)
+- [A Guide to Events in OkHTTP](https://www.baeldung.com/java-okhttp-events)
- More articles [[<-- prev]](/libraries-http)
diff --git a/libraries-http-2/pom.xml b/libraries-http-2/pom.xml
index 855008521f..d8479def3c 100644
--- a/libraries-http-2/pom.xml
+++ b/libraries-http-2/pom.xml
@@ -71,7 +71,6 @@
reactive-streams
${reactive.stream.version}
-
com.squareup.retrofit2
@@ -98,4 +97,4 @@
3.2.12.RELEASE
-
+
\ No newline at end of file
diff --git a/libraries-http/pom.xml b/libraries-http/pom.xml
index 257cb988d6..8eb6142c38 100644
--- a/libraries-http/pom.xml
+++ b/libraries-http/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-http
libraries-http
@@ -18,14 +18,12 @@
assertj-core
${assertj.version}
-
com.squareup.okhttp3
okhttp
${com.squareup.okhttp3.version}
-
com.google.http-client
@@ -37,7 +35,6 @@
google-http-client-jackson2
${googleclient.version}
-
com.squareup.retrofit2
@@ -54,33 +51,28 @@
adapter-rxjava
${retrofit.version}
-
org.asynchttpclient
async-http-client
${async.http.client.version}
-
com.fasterxml.jackson.core
jackson-databind
${jackson.version}
-
com.google.code.gson
gson
${gson.version}
-
com.squareup.okhttp3
mockwebserver
${com.squareup.okhttp3.version}
test
-
com.mashape.unirest
unirest-java
@@ -118,7 +110,7 @@
2.8.5
4.5.3
-
+
3.6.2
4.9.1
1.23.0
@@ -129,4 +121,4 @@
3.9.0
-
+
\ No newline at end of file
diff --git a/libraries-io/pom.xml b/libraries-io/pom.xml
index 8c2e841630..2f65fd989b 100644
--- a/libraries-io/pom.xml
+++ b/libraries-io/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
libraries-io
libraries-io
@@ -38,4 +38,4 @@
2.4
-
+
\ No newline at end of file
diff --git a/libraries-primitive/pom.xml b/libraries-primitive/pom.xml
index a3bf5e0d9d..06c42bd6c9 100644
--- a/libraries-primitive/pom.xml
+++ b/libraries-primitive/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
libraries-primitive
diff --git a/libraries-rpc/pom.xml b/libraries-rpc/pom.xml
index 8741a41062..ab6b74ae84 100644
--- a/libraries-rpc/pom.xml
+++ b/libraries-rpc/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
libraries-rpc
libraries-rpc
@@ -13,17 +14,16 @@
-
- com.twitter
- finagle-core_2.13
- ${finagle.core.version}
-
-
- com.twitter
- finagle-http_2.13
- ${finagle.http.version}
-
-
+
+ com.twitter
+ finagle-core_2.13
+ ${finagle.core.version}
+
+
+ com.twitter
+ finagle-http_2.13
+ ${finagle.http.version}
+
@@ -31,5 +31,4 @@
20.4.0
-
-
+
\ No newline at end of file
diff --git a/libraries-security/pom.xml b/libraries-security/pom.xml
index 3b812f0d2c..6ee6b7c358 100644
--- a/libraries-security/pom.xml
+++ b/libraries-security/pom.xml
@@ -91,4 +91,4 @@
2.4.0.RELEASE
-
+
\ No newline at end of file
diff --git a/libraries-server-2/pom.xml b/libraries-server-2/pom.xml
index 5f500a7ced..7377fa3fa9 100644
--- a/libraries-server-2/pom.xml
+++ b/libraries-server-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
libraries-server-2
0.0.1-SNAPSHOT
@@ -30,7 +31,7 @@
${jetty.version}
-
+
diff --git a/libraries-server/pom.xml b/libraries-server/pom.xml
index d9546f1678..e36ed88f8f 100644
--- a/libraries-server/pom.xml
+++ b/libraries-server/pom.xml
@@ -66,32 +66,27 @@
${junit.version}
test
-
org.apache.tomcat
tomcat-catalina
${tomcat.version}
-
org.igniterealtime.smack
smack-tcp
${smack.version}
-
org.igniterealtime.smack
smack-extensions
${smack.version}
-
org.igniterealtime.smack
smack-java7
${smack.version}
-
org.nanohttpd
@@ -103,7 +98,6 @@
nanohttpd-nanolets
${nanohttpd.version}
-
diff --git a/libraries-testing/pom.xml b/libraries-testing/pom.xml
index 8052680ea5..6d7e0c01e1 100644
--- a/libraries-testing/pom.xml
+++ b/libraries-testing/pom.xml
@@ -129,47 +129,40 @@
asciidoctor-maven-plugin
${asciidoctor.version}
-
org.dbunit
dbunit
${dbunit.version}
test
-
com.h2database
h2
${h2.version}
test
-
org.assertj
assertj-core
${assertj-core.version}
test
-
net.bytebuddy
byte-buddy
${byte-buddy.version}
test
-
com.tngtech.archunit
archunit-junit5
${archunit.version}
test
-
-
net.serenity-bdd.maven.plugins
serenity-maven-plugin
@@ -184,7 +177,6 @@
-
org.apache.maven.plugins
maven-compiler-plugin
@@ -194,7 +186,6 @@
${maven-compiler-plugin.target}
-
@@ -220,4 +211,4 @@
0.14.1
-
+
\ No newline at end of file
diff --git a/libraries/pom.xml b/libraries/pom.xml
index 5924ed009a..13f91fddd0 100644
--- a/libraries/pom.xml
+++ b/libraries/pom.xml
@@ -34,7 +34,6 @@
commons-net
${commons-net.version}
-
org.javatuples
javatuples
@@ -87,7 +86,6 @@
${serenity.jira.version}
test
-
org.datanucleus
@@ -164,14 +162,12 @@
${serenity.version}
test
-
org.lucee
jets3t
${jets3t-version}
-
io.rest-assured
spring-mock-mvc
@@ -226,13 +222,11 @@
${org.hamcrest.java-hamcrest.version}
test
-
com.codepoetics
protonpack
${protonpack.version}
-
com.google.oauth-client
@@ -327,7 +321,6 @@
-
org.apache.maven.plugins
@@ -361,7 +354,6 @@
-
@@ -400,4 +392,4 @@
2.6
-
+
\ No newline at end of file
diff --git a/linkrest/pom.xml b/linkrest/pom.xml
index 89af27d50c..e40efb3930 100644
--- a/linkrest/pom.xml
+++ b/linkrest/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
linkrest
0.0.1-SNAPSHOT
@@ -44,7 +45,6 @@
-
diff --git a/logging-modules/flogger/pom.xml b/logging-modules/flogger/pom.xml
index e9189c8460..b96025f277 100644
--- a/logging-modules/flogger/pom.xml
+++ b/logging-modules/flogger/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
flogger
@@ -18,20 +18,17 @@
flogger
${flogger.version}
-
com.google.flogger
flogger-system-backend
${flogger.version}
runtime
-
com.google.flogger
flogger-slf4j-backend
${flogger.version}
-
com.google.flogger
flogger-log4j-backend
@@ -51,7 +48,6 @@
-
log4j
log4j
@@ -67,6 +63,6 @@
0.4
1.2.17
-
+
\ No newline at end of file
diff --git a/logging-modules/log-mdc/pom.xml b/logging-modules/log-mdc/pom.xml
index a7cfd3faa8..ddf1f23f8c 100644
--- a/logging-modules/log-mdc/pom.xml
+++ b/logging-modules/log-mdc/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
log-mdc
0.0.1-SNAPSHOT
@@ -37,14 +38,12 @@
jackson-databind
${jackson.version}
-
log4j
log4j
${log4j.version}
-
org.apache.logging.log4j
@@ -56,14 +55,12 @@
log4j-core
${log4j2.version}
-
com.lmax
disruptor
${disruptor.version}
-
org.jboss.logging
@@ -80,7 +77,6 @@
logging-service
-
@@ -104,4 +100,4 @@
5.6.2
-
+
\ No newline at end of file
diff --git a/logging-modules/log4j/pom.xml b/logging-modules/log4j/pom.xml
index 15cd2d530f..864e2253b5 100644
--- a/logging-modules/log4j/pom.xml
+++ b/logging-modules/log4j/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
log4j
1.0-SNAPSHOT
@@ -26,7 +26,6 @@
apache-log4j-extras
${log4j.version}
-
org.apache.logging.log4j
diff --git a/logging-modules/log4j2/pom.xml b/logging-modules/log4j2/pom.xml
index e09cbd5d33..aaf60a4216 100644
--- a/logging-modules/log4j2/pom.xml
+++ b/logging-modules/log4j2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
log4j2
log4j2
@@ -19,28 +20,24 @@
log4j-core
${log4j-core.version}
-
org.apache.logging.log4j
log4j-api
${log4j-core.version}
-
com.fasterxml.jackson.core
jackson-databind
${jackson.version}
-
com.fasterxml.jackson.dataformat
jackson-dataformat-xml
${jackson.version}
-
com.h2database
@@ -52,7 +49,6 @@
commons-dbcp2
${commons-dbcp2.version}
-
org.apache.logging.log4j
diff --git a/logging-modules/logback/pom.xml b/logging-modules/logback/pom.xml
index 9f5a3ef294..c11f20955b 100644
--- a/logging-modules/logback/pom.xml
+++ b/logging-modules/logback/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
logback
0.1-SNAPSHOT
@@ -71,4 +71,4 @@
1.1.1
-
+
\ No newline at end of file
diff --git a/logging-modules/pom.xml b/logging-modules/pom.xml
index e396d477dc..6d036d5648 100644
--- a/logging-modules/pom.xml
+++ b/logging-modules/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
logging-modules
logging-modules
@@ -24,4 +25,5 @@
5.6.2
+
diff --git a/lombok/pom.xml b/lombok/pom.xml
index e347515b40..334d1defc9 100644
--- a/lombok/pom.xml
+++ b/lombok/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
lombok
0.1-SNAPSHOT
@@ -42,9 +42,7 @@
true
-
-
org.projectlombok
lombok-maven-plugin
@@ -66,8 +64,9 @@
false
-
+
@@ -76,7 +75,6 @@
1.18.10
-
1.0.0.Final
@@ -84,4 +82,4 @@
3.8.0
-
+
\ No newline at end of file
diff --git a/lucene/pom.xml b/lucene/pom.xml
index 0a0e09f724..0f08abaee9 100644
--- a/lucene/pom.xml
+++ b/lucene/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
lucene
0.0.1-SNAPSHOT
diff --git a/mapstruct/pom.xml b/mapstruct/pom.xml
index 9b416177e7..1434db0d54 100644
--- a/mapstruct/pom.xml
+++ b/mapstruct/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
mapstruct
1.0
@@ -79,4 +80,4 @@
3.16.1
-
+
\ No newline at end of file
diff --git a/maven-archetype/pom.xml b/maven-archetype/pom.xml
index be616ac299..2eab8ac614 100644
--- a/maven-archetype/pom.xml
+++ b/maven-archetype/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.archetypes
maven-archetype
@@ -26,4 +27,4 @@
3.0.1
-
+
\ No newline at end of file
diff --git a/maven-modules/compiler-plugin-java-9/pom.xml b/maven-modules/compiler-plugin-java-9/pom.xml
index 6baadb451c..1063ee2e8f 100644
--- a/maven-modules/compiler-plugin-java-9/pom.xml
+++ b/maven-modules/compiler-plugin-java-9/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
compiler-plugin-java-9
@@ -25,6 +25,6 @@
3.8.0
9
9
-
+
\ No newline at end of file
diff --git a/maven-modules/maven-copy-files/copy-rename-maven-plugin/pom.xml b/maven-modules/maven-copy-files/copy-rename-maven-plugin/pom.xml
new file mode 100644
index 0000000000..24a7c48499
--- /dev/null
+++ b/maven-modules/maven-copy-files/copy-rename-maven-plugin/pom.xml
@@ -0,0 +1,92 @@
+
+
+ 4.0.0
+
+ maven-copy-files
+ com.baeldung
+ 1.0-SNAPSHOT
+
+ org.baeldung
+ copy-rename-maven-plugin
+ 1.0-SNAPSHOT
+ copy-rename-maven-plugin
+
+ UTF-8
+ 1.7
+ 1.7
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+
+
+ com.coderplus.maven.plugins
+ copy-rename-maven-plugin
+ 1.0
+
+
+ copy-file
+ generate-sources
+
+ copy
+
+
+ source-files/foo.txt
+ target/destination-folder/foo.txt
+
+
+
+
+
+
+
+
+
+
+ maven-clean-plugin
+ 3.1.0
+
+
+
+ maven-resources-plugin
+ 3.0.2
+
+
+ maven-compiler-plugin
+ 3.8.0
+
+
+ maven-surefire-plugin
+ 2.22.1
+
+
+ maven-jar-plugin
+ 3.0.2
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-deploy-plugin
+ 2.8.2
+
+
+
+ maven-site-plugin
+ 3.7.1
+
+
+ maven-project-info-reports-plugin
+ 3.0.0
+
+
+
+
+
diff --git a/maven-modules/maven-copy-files/copy-rename-maven-plugin/source-files/foo.txt b/maven-modules/maven-copy-files/copy-rename-maven-plugin/source-files/foo.txt
new file mode 100644
index 0000000000..b2fa85b97f
--- /dev/null
+++ b/maven-modules/maven-copy-files/copy-rename-maven-plugin/source-files/foo.txt
@@ -0,0 +1 @@
+Copy File Example
diff --git a/maven-modules/maven-copy-files/copy-rename-maven-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java b/maven-modules/maven-copy-files/copy-rename-maven-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java
new file mode 100644
index 0000000000..a98db61fa9
--- /dev/null
+++ b/maven-modules/maven-copy-files/copy-rename-maven-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java
@@ -0,0 +1,16 @@
+package org.baeldung;
+
+import org.junit.Test;
+
+import java.io.File;
+
+import static org.junit.Assert.assertEquals;
+
+public class CopyFileUnitTest {
+
+ @Test
+ public void whenCopyingAFileFromSourceToDestination_thenFileShouldBeInDestination() {
+ File destinationFile = new File("target/destination-folder/foo.txt");
+ assertEquals(true, destinationFile.exists());
+ }
+}
diff --git a/maven-modules/maven-copy-files/maven-antrun-plugin/pom.xml b/maven-modules/maven-copy-files/maven-antrun-plugin/pom.xml
new file mode 100644
index 0000000000..61017dd18a
--- /dev/null
+++ b/maven-modules/maven-copy-files/maven-antrun-plugin/pom.xml
@@ -0,0 +1,94 @@
+
+
+ 4.0.0
+
+ maven-copy-files
+ com.baeldung
+ 1.0-SNAPSHOT
+
+ org.baeldung
+ maven-antrun-plugin
+ 1.0-SNAPSHOT
+ maven-antrun-plugin
+
+ UTF-8
+ 1.7
+ 1.7
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+
+
+ maven-antrun-plugin
+ 3.0.0
+
+
+ generate-sources
+
+
+
+
+
+
+
+
+
+ run
+
+
+
+
+
+
+
+
+
+
+ maven-clean-plugin
+ 3.1.0
+
+
+
+ maven-resources-plugin
+ 3.0.2
+
+
+ maven-compiler-plugin
+ 3.8.0
+
+
+ maven-surefire-plugin
+ 2.22.1
+
+
+ maven-jar-plugin
+ 3.0.2
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-deploy-plugin
+ 2.8.2
+
+
+
+ maven-site-plugin
+ 3.7.1
+
+
+ maven-project-info-reports-plugin
+ 3.0.0
+
+
+
+
+
diff --git a/maven-modules/maven-copy-files/maven-antrun-plugin/source-files/foo.txt b/maven-modules/maven-copy-files/maven-antrun-plugin/source-files/foo.txt
new file mode 100644
index 0000000000..b2fa85b97f
--- /dev/null
+++ b/maven-modules/maven-copy-files/maven-antrun-plugin/source-files/foo.txt
@@ -0,0 +1 @@
+Copy File Example
diff --git a/maven-modules/maven-copy-files/maven-antrun-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java b/maven-modules/maven-copy-files/maven-antrun-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java
new file mode 100644
index 0000000000..a98db61fa9
--- /dev/null
+++ b/maven-modules/maven-copy-files/maven-antrun-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java
@@ -0,0 +1,16 @@
+package org.baeldung;
+
+import org.junit.Test;
+
+import java.io.File;
+
+import static org.junit.Assert.assertEquals;
+
+public class CopyFileUnitTest {
+
+ @Test
+ public void whenCopyingAFileFromSourceToDestination_thenFileShouldBeInDestination() {
+ File destinationFile = new File("target/destination-folder/foo.txt");
+ assertEquals(true, destinationFile.exists());
+ }
+}
diff --git a/maven-modules/maven-copy-files/maven-resources-plugin/pom.xml b/maven-modules/maven-copy-files/maven-resources-plugin/pom.xml
new file mode 100644
index 0000000000..7dbe851f95
--- /dev/null
+++ b/maven-modules/maven-copy-files/maven-resources-plugin/pom.xml
@@ -0,0 +1,92 @@
+
+
+ 4.0.0
+
+ maven-copy-files
+ com.baeldung
+ 1.0-SNAPSHOT
+
+ org.baeldung
+ maven-resources-plugin
+ 1.0-SNAPSHOT
+ maven-resoures-plugin
+
+ UTF-8
+ 1.7
+ 1.7
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+
+
+
+
+
+ maven-clean-plugin
+ 3.1.0
+
+
+
+ maven-resources-plugin
+ 3.0.2
+
+
+ copy-resource-one
+ generate-sources
+
+ copy-resources
+
+
+ ${basedir}/target/destination-folder
+
+
+ source-files
+
+ foo.txt
+
+
+
+
+
+
+
+
+ maven-compiler-plugin
+ 3.8.0
+
+
+ maven-surefire-plugin
+ 2.22.1
+
+
+ maven-jar-plugin
+ 3.0.2
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-deploy-plugin
+ 2.8.2
+
+
+
+ maven-site-plugin
+ 3.7.1
+
+
+ maven-project-info-reports-plugin
+ 3.0.0
+
+
+
+
+
diff --git a/maven-modules/maven-copy-files/maven-resources-plugin/source-files/foo.txt b/maven-modules/maven-copy-files/maven-resources-plugin/source-files/foo.txt
new file mode 100644
index 0000000000..b2fa85b97f
--- /dev/null
+++ b/maven-modules/maven-copy-files/maven-resources-plugin/source-files/foo.txt
@@ -0,0 +1 @@
+Copy File Example
diff --git a/maven-modules/maven-copy-files/maven-resources-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java b/maven-modules/maven-copy-files/maven-resources-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java
new file mode 100644
index 0000000000..a98db61fa9
--- /dev/null
+++ b/maven-modules/maven-copy-files/maven-resources-plugin/src/test/java/org/baeldung/CopyFileUnitTest.java
@@ -0,0 +1,16 @@
+package org.baeldung;
+
+import org.junit.Test;
+
+import java.io.File;
+
+import static org.junit.Assert.assertEquals;
+
+public class CopyFileUnitTest {
+
+ @Test
+ public void whenCopyingAFileFromSourceToDestination_thenFileShouldBeInDestination() {
+ File destinationFile = new File("target/destination-folder/foo.txt");
+ assertEquals(true, destinationFile.exists());
+ }
+}
diff --git a/maven-modules/maven-copy-files/pom.xml b/maven-modules/maven-copy-files/pom.xml
new file mode 100644
index 0000000000..b7b67286bc
--- /dev/null
+++ b/maven-modules/maven-copy-files/pom.xml
@@ -0,0 +1,80 @@
+
+
+ 4.0.0
+
+ maven-modules
+ com.baeldung
+ 0.0.1-SNAPSHOT
+
+ com.baeldung
+ maven-copy-files
+ 1.0-SNAPSHOT
+ pom
+ maven-copy-files
+
+ http://www.example.com
+
+ UTF-8
+ 1.7
+ 1.7
+
+
+
+ junit
+ junit
+ 4.11
+ test
+
+
+
+
+
+
+
+
+ maven-clean-plugin
+ 3.1.0
+
+
+
+ maven-resources-plugin
+ 3.0.2
+
+
+ maven-compiler-plugin
+ 3.8.0
+
+
+ maven-surefire-plugin
+ 2.22.1
+
+
+ maven-jar-plugin
+ 3.0.2
+
+
+ maven-install-plugin
+ 2.5.2
+
+
+ maven-deploy-plugin
+ 2.8.2
+
+
+
+ maven-site-plugin
+ 3.7.1
+
+
+ maven-project-info-reports-plugin
+ 3.0.0
+
+
+
+
+
+ maven-resources-plugin
+ maven-antrun-plugin
+ copy-rename-maven-plugin
+
+
diff --git a/maven-modules/maven-custom-plugin/pom.xml b/maven-modules/maven-custom-plugin/pom.xml
index ad22c735ff..731abe472d 100644
--- a/maven-modules/maven-custom-plugin/pom.xml
+++ b/maven-modules/maven-custom-plugin/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
maven-custom-plugin
diff --git a/maven-modules/maven-exec-plugin/pom.xml b/maven-modules/maven-exec-plugin/pom.xml
index 6c12971e29..837f31edeb 100644
--- a/maven-modules/maven-exec-plugin/pom.xml
+++ b/maven-modules/maven-exec-plugin/pom.xml
@@ -1,19 +1,13 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
maven-exec-plugin
0.0.1-SNAPSHOT
maven-exec-plugin
-
- 3.8.1
- 1.8
- 1.2.3
-
-
ch.qos.logback
@@ -33,7 +27,6 @@
${java.version}
-
org.codehaus.mojo
exec-maven-plugin
@@ -50,4 +43,10 @@
-
+
+ 3.8.1
+ 1.8
+ 1.2.3
+
+
+
\ No newline at end of file
diff --git a/maven-modules/maven-integration-test/pom.xml b/maven-modules/maven-integration-test/pom.xml
index 0031230bb1..4ab8de783d 100644
--- a/maven-modules/maven-integration-test/pom.xml
+++ b/maven-modules/maven-integration-test/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
maven-integration-test
0.0.1-SNAPSHOT
diff --git a/maven-modules/maven-multi-source/pom.xml b/maven-modules/maven-multi-source/pom.xml
index 0c85049df7..65e00419af 100644
--- a/maven-modules/maven-multi-source/pom.xml
+++ b/maven-modules/maven-multi-source/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
maven-multi-source
0.0.1-SNAPSHOT
diff --git a/maven-modules/maven-plugins/custom-rule/pom.xml b/maven-modules/maven-plugins/custom-rule/pom.xml
index 075a5c7943..3426f30457 100644
--- a/maven-modules/maven-plugins/custom-rule/pom.xml
+++ b/maven-modules/maven-plugins/custom-rule/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
custom-rule
@@ -45,12 +46,6 @@
-
- 3.0.0-M2
- 2.0.9
- 1.0-alpha-9
-
-
@@ -64,4 +59,10 @@
-
+
+ 3.0.0-M2
+ 2.0.9
+ 1.0-alpha-9
+
+
+
\ No newline at end of file
diff --git a/maven-modules/maven-plugins/jaxws/pom.xml b/maven-modules/maven-plugins/jaxws/pom.xml
index 161c1dc731..5783907140 100644
--- a/maven-modules/maven-plugins/jaxws/pom.xml
+++ b/maven-modules/maven-plugins/jaxws/pom.xml
@@ -1,15 +1,16 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ jaxws
+
maven-plugins
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
- jaxws
diff --git a/maven-modules/maven-plugins/maven-enforcer/pom.xml b/maven-modules/maven-plugins/maven-enforcer/pom.xml
index 01f97a061e..25c608ee36 100644
--- a/maven-modules/maven-plugins/maven-enforcer/pom.xml
+++ b/maven-modules/maven-plugins/maven-enforcer/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
maven-enforcer
maven-enforcer
@@ -18,13 +18,13 @@
org.apache.maven.plugins
maven-enforcer-plugin
3.0.0-M2
-
-
-
-
-
-
-
+
+
+
+
+
+
+
enforce
@@ -33,7 +33,7 @@
-
+
3.0
Invalid Maven version. It should, at least, be 3.0
@@ -55,7 +55,7 @@
WARN
-
+
diff --git a/maven-modules/maven-plugins/pom.xml b/maven-modules/maven-plugins/pom.xml
index 20bdb4b45a..29b3b550ea 100644
--- a/maven-modules/maven-plugins/pom.xml
+++ b/maven-modules/maven-plugins/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
maven-plugins
diff --git a/maven-modules/maven-printing-plugins/.gitignore b/maven-modules/maven-printing-plugins/.gitignore
new file mode 100644
index 0000000000..333c1e910a
--- /dev/null
+++ b/maven-modules/maven-printing-plugins/.gitignore
@@ -0,0 +1 @@
+logs/
diff --git a/maven-modules/maven-printing-plugins/pom.xml b/maven-modules/maven-printing-plugins/pom.xml
new file mode 100644
index 0000000000..6ea1ab2a84
--- /dev/null
+++ b/maven-modules/maven-printing-plugins/pom.xml
@@ -0,0 +1,85 @@
+
+
+ 4.0.0
+ maven-printing-plugins
+ maven-printing-plugins
+
+
+ com.baeldung
+ parent-modules
+ 1.0.0-SNAPSHOT
+ ../..
+
+
+
+
+
+ maven-antrun-plugin
+ 3.0.0
+
+
+ antrun-plugin
+ validate
+
+ run
+
+
+
+
+
+
+
+
+
+
+
+
+
+ com.github.ekryd.echo-maven-plugin
+ echo-maven-plugin
+ 1.3.2
+
+
+ echo-maven-plugin-1
+ package
+
+ echo
+
+
+ Hello, world
+ Embed a line break: ${line.separator}
+ ArtifactId is ${project.artifactId}
+ INFO
+ /logs/log-echo.txt
+ true
+
+
+
+
+
+ org.codehaus.gmaven
+ groovy-maven-plugin
+ 2.1.1
+
+
+ validate
+
+ execute
+
+
+
+ log.info('Test message: {}', 'Hello, World!')
+ log.info('Embed a line break {}', System.lineSeparator())
+ log.info('ArtifactId is: ${project.artifactId}')
+ log.warn('Message only in debug mode')
+
+
+
+
+
+
+
+
diff --git a/maven-modules/maven-profiles/pom.xml b/maven-modules/maven-profiles/pom.xml
index f3aeb9d549..322dada104 100644
--- a/maven-modules/maven-profiles/pom.xml
+++ b/maven-modules/maven-profiles/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
maven-profiles
@@ -90,7 +90,7 @@
- 3.2.0
+ 3.2.0
\ No newline at end of file
diff --git a/maven-modules/maven-war-plugin/pom.xml b/maven-modules/maven-war-plugin/pom.xml
index 915be306ca..04188b8995 100644
--- a/maven-modules/maven-war-plugin/pom.xml
+++ b/maven-modules/maven-war-plugin/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
maven-war-plugin
diff --git a/maven-modules/optional-dependencies/main-project/pom.xml b/maven-modules/optional-dependencies/main-project/pom.xml
index 6a42683779..23da40dcf7 100644
--- a/maven-modules/optional-dependencies/main-project/pom.xml
+++ b/maven-modules/optional-dependencies/main-project/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
main-project
@@ -15,4 +15,5 @@
0.0.1-SNAPSHOT
+
\ No newline at end of file
diff --git a/maven-modules/optional-dependencies/optional-project/pom.xml b/maven-modules/optional-dependencies/optional-project/pom.xml
index 9ad4376c8d..7502e70c4a 100644
--- a/maven-modules/optional-dependencies/optional-project/pom.xml
+++ b/maven-modules/optional-dependencies/optional-project/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
optional-project
diff --git a/maven-modules/optional-dependencies/pom.xml b/maven-modules/optional-dependencies/pom.xml
index 12d028b2d7..761028ec95 100644
--- a/maven-modules/optional-dependencies/pom.xml
+++ b/maven-modules/optional-dependencies/pom.xml
@@ -1,19 +1,21 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ optional-dependencies
+ pom
+
maven-modules
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
- optional-dependencies
- pom
optional-project
project-with-optionals
main-project
+
\ No newline at end of file
diff --git a/maven-modules/optional-dependencies/project-with-optionals/pom.xml b/maven-modules/optional-dependencies/project-with-optionals/pom.xml
index 6a14f3260d..b95217d53d 100644
--- a/maven-modules/optional-dependencies/project-with-optionals/pom.xml
+++ b/maven-modules/optional-dependencies/project-with-optionals/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
project-with-optionals
@@ -16,4 +16,5 @@
true
+
\ No newline at end of file
diff --git a/maven-modules/pom.xml b/maven-modules/pom.xml
index a476eacc64..0f146e26da 100644
--- a/maven-modules/pom.xml
+++ b/maven-modules/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
maven-modules
0.0.1-SNAPSHOT
@@ -14,9 +15,10 @@
-
- maven-custom-plugin
- maven-exec-plugin
+
+ maven-copy-files
+ maven-custom-plugin
+ maven-exec-plugin
maven-integration-test
maven-multi-source
maven-plugins
@@ -29,6 +31,7 @@
version-collision
version-overriding-plugins
versions-maven-plugin
+ maven-printing-plugins
diff --git a/maven-modules/version-collision/pom.xml b/maven-modules/version-collision/pom.xml
index 6d8441aa7b..9c1b9641c8 100644
--- a/maven-modules/version-collision/pom.xml
+++ b/maven-modules/version-collision/pom.xml
@@ -1,23 +1,24 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ version-collision
+ pom
+
maven-modules
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
- version-collision
- pom
project-a
project-b
project-collision
-
+
@@ -29,26 +30,26 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/maven-modules/version-collision/project-a/pom.xml b/maven-modules/version-collision/project-a/pom.xml
index 1b7af7e963..ca06c7daca 100644
--- a/maven-modules/version-collision/project-a/pom.xml
+++ b/maven-modules/version-collision/project-a/pom.xml
@@ -1,15 +1,15 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ project-a
+
version-collision
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
-
- project-a
@@ -18,4 +18,5 @@
22.0
+
\ No newline at end of file
diff --git a/maven-modules/version-collision/project-b/pom.xml b/maven-modules/version-collision/project-b/pom.xml
index 0b0f50aeb8..a7185ab22d 100644
--- a/maven-modules/version-collision/project-b/pom.xml
+++ b/maven-modules/version-collision/project-b/pom.xml
@@ -1,15 +1,15 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ project-b
+
version-collision
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
-
- project-b
@@ -18,4 +18,5 @@
29.0-jre
+
\ No newline at end of file
diff --git a/maven-modules/version-collision/project-collision/pom.xml b/maven-modules/version-collision/project-collision/pom.xml
index 3bec0ed54a..74f117cdbb 100644
--- a/maven-modules/version-collision/project-collision/pom.xml
+++ b/maven-modules/version-collision/project-collision/pom.xml
@@ -1,16 +1,15 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ project-collision
+
version-collision
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
-
- project-collision
-
@@ -18,12 +17,12 @@
project-a
0.0.1-SNAPSHOT
-
-
-
-
-
-
+
+
+
+
+
+
com.baeldung
@@ -31,4 +30,5 @@
0.0.1-SNAPSHOT
+
\ No newline at end of file
diff --git a/maven-modules/version-overriding-plugins/child-a/pom.xml b/maven-modules/version-overriding-plugins/child-a/pom.xml
index 780e1c4125..45098ccef0 100644
--- a/maven-modules/version-overriding-plugins/child-a/pom.xml
+++ b/maven-modules/version-overriding-plugins/child-a/pom.xml
@@ -1,16 +1,17 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ child-a
+ pom
+
version-overriding-plugins
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
- pom
- child-a
@@ -33,4 +34,5 @@
+
\ No newline at end of file
diff --git a/maven-modules/version-overriding-plugins/child-b/pom.xml b/maven-modules/version-overriding-plugins/child-b/pom.xml
index 05f127bc5c..f86a3c2096 100644
--- a/maven-modules/version-overriding-plugins/child-b/pom.xml
+++ b/maven-modules/version-overriding-plugins/child-b/pom.xml
@@ -1,15 +1,14 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ child-b
+
version-overriding-plugins
com.baeldung
0.0.1-SNAPSHOT
- 4.0.0
-
- child-b
-
\ No newline at end of file
diff --git a/maven-modules/version-overriding-plugins/pom.xml b/maven-modules/version-overriding-plugins/pom.xml
index 8d703ab568..79109a83e1 100644
--- a/maven-modules/version-overriding-plugins/pom.xml
+++ b/maven-modules/version-overriding-plugins/pom.xml
@@ -1,19 +1,16 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ version-overriding-plugins
+ pom
+
maven-modules
com.baeldung
0.0.1-SNAPSHOT
-
- 3.8.0
-
- 4.0.0
-
- version-overriding-plugins
- pom
child-a
@@ -52,4 +49,9 @@
+
+
+ 3.8.0
+
+
\ No newline at end of file
diff --git a/maven-modules/versions-maven-plugin/original/pom.xml b/maven-modules/versions-maven-plugin/original/pom.xml
index c36a5913c2..2d81274611 100644
--- a/maven-modules/versions-maven-plugin/original/pom.xml
+++ b/maven-modules/versions-maven-plugin/original/pom.xml
@@ -8,37 +8,31 @@
0.0.1-SNAPSHOT
-
commons-io
commons-io
${commons-io.version}
-
org.apache.commons
commons-collections4
${commons-collections4.version}
-
org.apache.commons
commons-lang3
${commons-lang3.version}
-
org.apache.commons
commons-compress
${commons-compress-version}
-
commons-beanutils
commons-beanutils
${commons-beanutils.version}
-
@@ -70,12 +64,12 @@
-
+
1.15
2.3
4.0
1.9.1
2.7
-
+
\ No newline at end of file
diff --git a/maven-modules/versions-maven-plugin/pom.xml b/maven-modules/versions-maven-plugin/pom.xml
index ff49811430..9c837cefa0 100644
--- a/maven-modules/versions-maven-plugin/pom.xml
+++ b/maven-modules/versions-maven-plugin/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
versions-maven-plugin
@@ -14,25 +14,21 @@
commons-io
${commons.io.version}
-
org.apache.commons
commons-collections4
${commons.collections4.version}
-
org.apache.commons
commons-lang3
${commons.lang3.version}
-
org.apache.commons
commons-compress
${commons-compress-version}
-
commons-beanutils
commons-beanutils
diff --git a/maven-polyglot/maven-polyglot-json-extension/pom.xml b/maven-polyglot/maven-polyglot-json-extension/pom.xml
index 15166046c1..13d0b2099b 100644
--- a/maven-polyglot/maven-polyglot-json-extension/pom.xml
+++ b/maven-polyglot/maven-polyglot-json-extension/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.maven.polyglot
maven-polyglot-json-extension
diff --git a/maven-polyglot/pom.xml b/maven-polyglot/pom.xml
index eb4e629a96..496ce58bf2 100644
--- a/maven-polyglot/pom.xml
+++ b/maven-polyglot/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
maven-polyglot
0.0.1-SNAPSHOT
@@ -19,4 +20,4 @@
-
+
\ No newline at end of file
diff --git a/mesos-marathon/pom.xml b/mesos-marathon/pom.xml
index 42798bb209..58ca14ca93 100644
--- a/mesos-marathon/pom.xml
+++ b/mesos-marathon/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
mesos-marathon
mesos-marathon
diff --git a/metrics/pom.xml b/metrics/pom.xml
index 07adf15936..2020cd28cf 100644
--- a/metrics/pom.xml
+++ b/metrics/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
metrics
metrics
@@ -37,7 +38,6 @@
javax.servlet-api
${dep.ver.servlet}
-
com.netflix.servo
servo-core
@@ -50,19 +50,16 @@
${netflix.servo.ver}
test
-
io.micrometer
micrometer-registry-atlas
${micrometer.ver}
-
org.springframework.boot
spring-boot-starter-web
${spring-boot-starter-web.version}
-
com.fasterxml.jackson.core
jackson-databind
@@ -73,13 +70,11 @@
jackson-dataformat-smile
${jackson.version}
-
io.astefanutti.metrics.aspectj
metrics-aspectj-deps
${metrics-aspectj.version}
-
org.assertj
assertj-core
@@ -93,10 +88,10 @@
3.1.0
0.12.17
0.12.0.RELEASE
-
+
2.0.7.RELEASE
3.11.1
1.1.0
-
+
\ No newline at end of file
diff --git a/micronaut/pom.xml b/micronaut/pom.xml
index bd0022c9e1..196218d856 100644
--- a/micronaut/pom.xml
+++ b/micronaut/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.micronaut
micronaut
@@ -90,10 +91,12 @@
-
+
${exec.mainClass}
-
+
@@ -106,7 +109,7 @@
java
-classpath
-
+
${exec.mainClass}
@@ -148,4 +151,4 @@
3.1.0
-
+
\ No newline at end of file
diff --git a/microprofile/pom.xml b/microprofile/pom.xml
index 5a32ad8dba..54ed3a9930 100644
--- a/microprofile/pom.xml
+++ b/microprofile/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
microprofile
1.0-SNAPSHOT
@@ -87,4 +88,4 @@
17.0.0.4
-
+
\ No newline at end of file
diff --git a/msf4j/pom.xml b/msf4j/pom.xml
index a220ce0229..99e25dbcbf 100644
--- a/msf4j/pom.xml
+++ b/msf4j/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.msf4j
msf4j
diff --git a/mustache/pom.xml b/mustache/pom.xml
index 9f2402f353..db72e693c1 100644
--- a/mustache/pom.xml
+++ b/mustache/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
mustache
mustache
@@ -19,22 +20,18 @@
compiler
${mustache.compiler.api.version}
-
org.assertj
assertj-core
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-mustache
-
org.springframework.boot
spring-boot-starter-test
diff --git a/mybatis/pom.xml b/mybatis/pom.xml
index 3b4695fb58..4cd705c917 100644
--- a/mybatis/pom.xml
+++ b/mybatis/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
mybatis
mybatis
diff --git a/netflix-modules/genie/pom.xml b/netflix-modules/genie/pom.xml
index c68ecac7a2..61c0dac9ad 100644
--- a/netflix-modules/genie/pom.xml
+++ b/netflix-modules/genie/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
genie
diff --git a/netflix-modules/mantis/pom.xml b/netflix-modules/mantis/pom.xml
index 3f75d448e4..1f8b377b94 100644
--- a/netflix-modules/mantis/pom.xml
+++ b/netflix-modules/mantis/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
mantis
@@ -15,13 +16,10 @@
-
org.springframework.boot
spring-boot-starter
- 2.1.3.RELEASE
-
io.mantisrx
mantis-runtime
@@ -33,46 +31,35 @@
-
com.fasterxml.jackson.core
jackson-databind
- 2.10.2
-
net.andreinc.mockneat
mockneat
- 0.3.8
+ 0.4.2
-
org.projectlombok
lombok
- 1.18.12
-
org.springframework
spring-webflux
- 5.0.9.RELEASE
test
-
io.projectreactor.netty
reactor-netty
- 0.9.12.RELEASE
test
-
-
- SpringLibReleaseRepo
- https://repo.spring.io/libs-release/
+ jcenter
+ https://jcenter.bintray.com/
-
+
\ No newline at end of file
diff --git a/netflix-modules/pom.xml b/netflix-modules/pom.xml
index 4031d007f8..d9660be6a1 100644
--- a/netflix-modules/pom.xml
+++ b/netflix-modules/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
netflix-modules
netflix-modules
diff --git a/ninja/pom.xml b/ninja/pom.xml
index 9b80dc26c8..93f22cf718 100644
--- a/ninja/pom.xml
+++ b/ninja/pom.xml
@@ -1,15 +1,12 @@
-
4.0.0
-
ninja
jar
com.baeldung
1.0.0
-
http://www.ninjaframework.org
@@ -148,8 +145,10 @@
-
-
+
+
ninja.standalone.NinjaJetty
diff --git a/oauth2-framework-impl/oauth2-authorization-server/pom.xml b/oauth2-framework-impl/oauth2-authorization-server/pom.xml
index e608c09188..f8ced851ba 100644
--- a/oauth2-framework-impl/oauth2-authorization-server/pom.xml
+++ b/oauth2-framework-impl/oauth2-authorization-server/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
oauth2-authorization-server
oauth2-authorization-server
@@ -74,4 +74,4 @@
1.62
-
+
\ No newline at end of file
diff --git a/oauth2-framework-impl/oauth2-client/pom.xml b/oauth2-framework-impl/oauth2-client/pom.xml
index febfe8dd27..814dabc664 100644
--- a/oauth2-framework-impl/oauth2-client/pom.xml
+++ b/oauth2-framework-impl/oauth2-client/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
oauth2-client
oauth2-client
@@ -27,4 +27,4 @@
9543
-
+
\ No newline at end of file
diff --git a/oauth2-framework-impl/oauth2-resource-server/pom.xml b/oauth2-framework-impl/oauth2-resource-server/pom.xml
index 62f5889290..8f135055a2 100644
--- a/oauth2-framework-impl/oauth2-resource-server/pom.xml
+++ b/oauth2-framework-impl/oauth2-resource-server/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
oauth2-resource-server
oauth2-resource-server
@@ -39,4 +39,4 @@
1.1
-
+
\ No newline at end of file
diff --git a/oauth2-framework-impl/pom.xml b/oauth2-framework-impl/pom.xml
index 24559d3c4d..31983b08ad 100644
--- a/oauth2-framework-impl/pom.xml
+++ b/oauth2-framework-impl/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
com.baeldung.oauth2
oauth2-framework-impl
@@ -95,4 +95,4 @@
1.3
-
+
\ No newline at end of file
diff --git a/open-liberty/pom.xml b/open-liberty/pom.xml
index 0e8b159043..aff951cfd8 100644
--- a/open-liberty/pom.xml
+++ b/open-liberty/pom.xml
@@ -1,9 +1,8 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
com.baeldung
open-liberty
1.0-SNAPSHOT
@@ -29,7 +28,6 @@
${version.derby}
provided
-
junit
@@ -87,7 +85,6 @@
maven-war-plugin
${version.maven-war-plugin}
-
@@ -97,7 +94,6 @@
UTF-8
UTF-8
false
-
8.0.0
3.2
@@ -109,7 +105,6 @@
3.2.6
1.0.4
3.3.1
-
openliberty
9080
diff --git a/optaplanner/pom.xml b/optaplanner/pom.xml
index d907cfc830..0e5fa9050e 100644
--- a/optaplanner/pom.xml
+++ b/optaplanner/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
optaplanner
optaplanner
diff --git a/orika/pom.xml b/orika/pom.xml
index 6974bd296e..c18bb58a51 100644
--- a/orika/pom.xml
+++ b/orika/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
orika
1.0
@@ -24,4 +25,4 @@
1.5.0
-
+
\ No newline at end of file
diff --git a/osgi/osgi-intro-sample-activator/pom.xml b/osgi/osgi-intro-sample-activator/pom.xml
index e6611dcf7d..3cabba4cb1 100644
--- a/osgi/osgi-intro-sample-activator/pom.xml
+++ b/osgi/osgi-intro-sample-activator/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
osgi-intro-sample-activator
osgi-intro-sample-activator
@@ -32,19 +33,16 @@
${project.groupId}.${project.artifactId}
${project.artifactId}
${project.version}
-
com.baeldung.osgi.sample.activator.HelloWorld
-
-
-
+
com.baeldung.osgi.sample.activator
-
-
+
\ No newline at end of file
diff --git a/osgi/osgi-intro-sample-client/pom.xml b/osgi/osgi-intro-sample-client/pom.xml
index e91b831db1..b1b04aef78 100644
--- a/osgi/osgi-intro-sample-client/pom.xml
+++ b/osgi/osgi-intro-sample-client/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
osgi-intro-sample-client
diff --git a/osgi/osgi-intro-sample-service/pom.xml b/osgi/osgi-intro-sample-service/pom.xml
index b44e1f9be3..af97d1c90d 100644
--- a/osgi/osgi-intro-sample-service/pom.xml
+++ b/osgi/osgi-intro-sample-service/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
osgi-intro-sample-service
osgi-intro-sample-service
diff --git a/osgi/pom.xml b/osgi/pom.xml
index afc980c8bd..3fa2dcdf02 100644
--- a/osgi/pom.xml
+++ b/osgi/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
osgi
1.0-SNAPSHOT
diff --git a/patterns/clean-architecture/pom.xml b/patterns/clean-architecture/pom.xml
index b9968095f8..c36f9b83af 100644
--- a/patterns/clean-architecture/pom.xml
+++ b/patterns/clean-architecture/pom.xml
@@ -69,7 +69,6 @@
-
@@ -80,4 +79,4 @@
-
+
\ No newline at end of file
diff --git a/patterns/cqrs-es/pom.xml b/patterns/cqrs-es/pom.xml
index 0829e35f34..826440b45d 100644
--- a/patterns/cqrs-es/pom.xml
+++ b/patterns/cqrs-es/pom.xml
@@ -5,13 +5,13 @@
cqrs-es
1.0-SNAPSHOT
cqrs-es
-
+
com.baeldung
patterns
1.0.0-SNAPSHOT
-
+
org.projectlombok
diff --git a/patterns/design-patterns-architectural/pom.xml b/patterns/design-patterns-architectural/pom.xml
index d1945a1d0a..c917744757 100644
--- a/patterns/design-patterns-architectural/pom.xml
+++ b/patterns/design-patterns-architectural/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
design-patterns-architectural
1.0
@@ -20,7 +21,6 @@
${assertj-core.version}
test
-
org.hibernate
hibernate-core
@@ -40,4 +40,4 @@
6.0.6
-
+
\ No newline at end of file
diff --git a/patterns/design-patterns-behavioral-2/pom.xml b/patterns/design-patterns-behavioral-2/pom.xml
index 3a6d21353e..f123a8f2f5 100644
--- a/patterns/design-patterns-behavioral-2/pom.xml
+++ b/patterns/design-patterns-behavioral-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
design-patterns-behavioral-2
1.0
@@ -26,4 +27,4 @@
3.12.2
-
+
\ No newline at end of file
diff --git a/patterns/design-patterns-behavioral/pom.xml b/patterns/design-patterns-behavioral/pom.xml
index aceaabf582..bc032a0f8f 100644
--- a/patterns/design-patterns-behavioral/pom.xml
+++ b/patterns/design-patterns-behavioral/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
design-patterns-behavioral
1.0
@@ -25,12 +26,16 @@
${lombok.version}
provided
+
+ com.google.code.findbugs
+ annotations
+ ${findbugs.annotations.version}
+
org.apache.commons
commons-lang3
${commons-lang3.version}
-
org.assertj
assertj-core
@@ -41,7 +46,8 @@
16.0.2
+ 3.0.1
3.9.1
-
+
\ No newline at end of file
diff --git a/patterns/design-patterns-behavioral/src/main/java/com/baeldung/nulls/FindBugsAnnotations.java b/patterns/design-patterns-behavioral/src/main/java/com/baeldung/nulls/FindBugsAnnotations.java
index 697d5e4959..594516e3f2 100644
--- a/patterns/design-patterns-behavioral/src/main/java/com/baeldung/nulls/FindBugsAnnotations.java
+++ b/patterns/design-patterns-behavioral/src/main/java/com/baeldung/nulls/FindBugsAnnotations.java
@@ -1,12 +1,12 @@
package com.baeldung.nulls;
-import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import edu.umd.cs.findbugs.annotations.NonNull;
+import edu.umd.cs.findbugs.annotations.Nullable;
public class FindBugsAnnotations {
- public void accept(@NotNull Object param) {
+ public void accept(@NonNull Object param) {
System.out.println(param.toString());
}
@@ -14,7 +14,7 @@ public class FindBugsAnnotations {
System.out.println("Printing " + param);
}
- @NotNull
+ @NonNull
public Object process() throws Exception {
Object result = doSomething();
if (result == null) {
diff --git a/patterns/design-patterns-cloud/pom.xml b/patterns/design-patterns-cloud/pom.xml
index 34defb7eac..950b6efb94 100644
--- a/patterns/design-patterns-cloud/pom.xml
+++ b/patterns/design-patterns-cloud/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
design-patterns-cloud
@@ -9,4 +9,4 @@
design-patterns-cloud
pom
-
+
\ No newline at end of file
diff --git a/patterns/design-patterns-creational/pom.xml b/patterns/design-patterns-creational/pom.xml
index 7c2742ade4..21bc13c21c 100644
--- a/patterns/design-patterns-creational/pom.xml
+++ b/patterns/design-patterns-creational/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
design-patterns-creational
1.0
@@ -25,7 +26,6 @@
jsr305
${javax.annotations.version}
-
org.assertj
assertj-core
@@ -40,4 +40,4 @@
3.9.1
-
+
\ No newline at end of file
diff --git a/patterns/design-patterns-functional/pom.xml b/patterns/design-patterns-functional/pom.xml
index e5166dc61e..b801781564 100644
--- a/patterns/design-patterns-functional/pom.xml
+++ b/patterns/design-patterns-functional/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
design-patterns-functional
1.0
@@ -13,4 +14,4 @@
1.0.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/patterns/design-patterns-structural/pom.xml b/patterns/design-patterns-structural/pom.xml
index c37b6845be..f0bcb824b5 100644
--- a/patterns/design-patterns-structural/pom.xml
+++ b/patterns/design-patterns-structural/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
design-patterns-structural
1.0
@@ -21,4 +22,4 @@
-
+
\ No newline at end of file
diff --git a/patterns/dip/pom.xml b/patterns/dip/pom.xml
index 7217c4fdcc..44062aaede 100644
--- a/patterns/dip/pom.xml
+++ b/patterns/dip/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.dip
dip
@@ -27,4 +27,4 @@
3.12.1
-
+
\ No newline at end of file
diff --git a/patterns/front-controller/pom.xml b/patterns/front-controller/pom.xml
index dc10250946..d25bd774c6 100644
--- a/patterns/front-controller/pom.xml
+++ b/patterns/front-controller/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
front-controller
front-controller
@@ -36,5 +37,5 @@
-
-
+
+
\ No newline at end of file
diff --git a/patterns/hexagonal-architecture/pom.xml b/patterns/hexagonal-architecture/pom.xml
index db7ee69e2e..f8d4524514 100644
--- a/patterns/hexagonal-architecture/pom.xml
+++ b/patterns/hexagonal-architecture/pom.xml
@@ -1,12 +1,13 @@
-
- 4.0.0
- com.baeldung
- hexagonal-architecture
- 1.0
- hexagonal-architecture
- Project for hexagonal architecture in java
+
+ 4.0.0
+ com.baeldung
+ hexagonal-architecture
+ 1.0
+ hexagonal-architecture
+ Project for hexagonal architecture in java
com.baeldung
@@ -15,42 +16,41 @@
../../parent-boot-2
-
-
- org.springframework.boot
- spring-boot-starter-web
-
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
-
- org.springframework.boot
- spring-boot-starter-data-mongodb
-
+
+ org.springframework.boot
+ spring-boot-starter-data-mongodb
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+ org.junit.vintage
+ junit-vintage-engine
+
+
+
+
+ org.mockito
+ mockito-core
+ test
+
+
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
- org.junit.vintage
- junit-vintage-engine
-
-
-
-
- org.mockito
- mockito-core
- test
-
-
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
-
-
-
-
-
+
\ No newline at end of file
diff --git a/patterns/intercepting-filter/pom.xml b/patterns/intercepting-filter/pom.xml
index 7f2f57b5e1..ffc3309ddb 100644
--- a/patterns/intercepting-filter/pom.xml
+++ b/patterns/intercepting-filter/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
intercepting-filter
intercepting-filter
@@ -45,4 +46,4 @@
-
+
\ No newline at end of file
diff --git a/patterns/pom.xml b/patterns/pom.xml
index 112eecb606..3bde26cae2 100644
--- a/patterns/pom.xml
+++ b/patterns/pom.xml
@@ -1,15 +1,18 @@
-
+
4.0.0
patterns
patterns
pom
+
com.baeldung
parent-modules
1.0.0-SNAPSHOT
+
design-patterns-architectural
design-patterns-behavioral
@@ -26,6 +29,7 @@
solid
clean-architecture
+
@@ -36,6 +40,7 @@
+
@@ -52,7 +57,9 @@
+
9.4.0.v20161208
+
\ No newline at end of file
diff --git a/patterns/solid/pom.xml b/patterns/solid/pom.xml
index ad76ea89fd..76ab54cbb2 100644
--- a/patterns/solid/pom.xml
+++ b/patterns/solid/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
solid
1.0-SNAPSHOT
@@ -13,4 +13,4 @@
1.0.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/pdf/pom.xml b/pdf/pom.xml
index 7d7754ee73..fb9508156e 100644
--- a/pdf/pom.xml
+++ b/pdf/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
pdf
pdf
@@ -94,4 +95,4 @@
9.1.20
-
+
\ No newline at end of file
diff --git a/performance-tests/pom.xml b/performance-tests/pom.xml
index c203f0a923..8d402865ef 100644
--- a/performance-tests/pom.xml
+++ b/performance-tests/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
performance-tests
1.0
@@ -22,13 +23,12 @@
com.github.dozermapper
dozer-core
${dozer.version}
-
+
org.mapstruct
mapstruct
${mapstruct.version}
-
org.modelmapper
modelmapper
@@ -52,7 +52,6 @@
-
@@ -90,16 +89,14 @@
${uberjar.name}
-
+
org.openjdk.jmh.Main
-
+
*:*
META-INF/*.SF
@@ -156,16 +153,10 @@
6.5.0
1.3.1.Final
2.3.8
- 1.6.1.CR2
-
-
+ 1.6.1.CR2
+
1.8
-
-
+
benchmarks
3.1.0
3.0.0-M1
@@ -179,4 +170,4 @@
3.2.1
-
+
\ No newline at end of file
diff --git a/persistence-modules/activejdbc/pom.xml b/persistence-modules/activejdbc/pom.xml
index 84ce1c2b48..5fdf27a679 100644
--- a/persistence-modules/activejdbc/pom.xml
+++ b/persistence-modules/activejdbc/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
activejdbc
1.0-SNAPSHOT
diff --git a/persistence-modules/apache-bookkeeper/pom.xml b/persistence-modules/apache-bookkeeper/pom.xml
index 3ef1f50d63..2d86e3a912 100644
--- a/persistence-modules/apache-bookkeeper/pom.xml
+++ b/persistence-modules/apache-bookkeeper/pom.xml
@@ -2,7 +2,6 @@
-
4.0.0
apache-bookkeeper
0.0.1-SNAPSHOT
@@ -27,14 +26,12 @@
-
org.testcontainers
testcontainers
${testcontainers.version}
test
-
@@ -42,6 +39,4 @@
1.14.3
-
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/apache-cayenne/pom.xml b/persistence-modules/apache-cayenne/pom.xml
index d728e18b33..87bf6fe30b 100644
--- a/persistence-modules/apache-cayenne/pom.xml
+++ b/persistence-modules/apache-cayenne/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
apache-cayenne
0.0.1-SNAPSHOT
@@ -43,4 +44,4 @@
4.0.M5
-
+
\ No newline at end of file
diff --git a/persistence-modules/core-java-persistence-2/pom.xml b/persistence-modules/core-java-persistence-2/pom.xml
index a1088b0801..092900b628 100644
--- a/persistence-modules/core-java-persistence-2/pom.xml
+++ b/persistence-modules/core-java-persistence-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.core-java-persistence-2
core-java-persistence-2
@@ -31,24 +32,15 @@
mysql-connector-java
${mysql.driver.version}
-
+
com.microsoft.sqlserver
mssql-jdbc
${mssql.driver.version}
-
@@ -59,4 +51,4 @@
8.0.22
-
+
\ No newline at end of file
diff --git a/persistence-modules/core-java-persistence/pom.xml b/persistence-modules/core-java-persistence/pom.xml
index 3dd8da1b7a..f1d779cf2f 100644
--- a/persistence-modules/core-java-persistence/pom.xml
+++ b/persistence-modules/core-java-persistence/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.core-java-persistence
core-java-persistence
diff --git a/persistence-modules/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml
index 955ad4abe8..af02ba76c0 100644
--- a/persistence-modules/deltaspike/pom.xml
+++ b/persistence-modules/deltaspike/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
deltaspike
1.0
@@ -16,44 +17,39 @@
-
-
-
+
javax.enterprise
cdi-api
provided
-
-
+
org.jboss.spec.javax.annotation
jboss-annotations-api_1.2_spec
provided
-
org.jboss.resteasy
jaxrs-api
provided
-
org.hibernate.javax.persistence
hibernate-jpa-2.1-api
provided
-
org.jboss.spec.javax.ejb
jboss-ejb-api_3.2_spec
provided
-
@@ -68,62 +64,54 @@
-
org.jboss.spec.javax.faces
jboss-jsf-api_2.2_spec
provided
-
-
org.hibernate
hibernate-jpamodelgen
provided
-
-
+
org.hibernate
hibernate-validator-annotation-processor
provided
-
-
+
org.jboss.arquillian.junit
arquillian-junit-container
test
-
org.jboss.arquillian.protocol
arquillian-protocol-servlet
test
-
org.jboss.shrinkwrap.resolver
shrinkwrap-resolver-impl-maven
test
-
org.apache.deltaspike.modules
deltaspike-data-module-api
compile
-
org.apache.deltaspike.modules
deltaspike-data-module-impl
runtime
-
com.mysema.querydsl
@@ -131,74 +119,64 @@
${querydsl.version}
provided
-
com.mysema.querydsl
querydsl-jpa
${querydsl.version}
-
org.apache.deltaspike.modules
deltaspike-test-control-module-api
test
-
org.apache.deltaspike.modules
deltaspike-test-control-module-impl
test
-
org.apache.deltaspike.cdictrl
deltaspike-cdictrl-weld
test
-
org.jboss.weld.se
weld-se-core
${weld.version}
test
-
org.hibernate
hibernate-core
provided
-
org.jboss
jandex
${jandex.version}
-
com.h2database
h2
${h2.version}
test
-
org.hibernate
hibernate-entitymanager
provided
-
org.apache.commons
commons-lang3
${commons-lang3.version}
-
-
+
${project.artifactId}
@@ -237,9 +215,9 @@
-
-
+
arq-wildfly-managed
@@ -259,6 +237,7 @@
http://www.apache.org/licenses/LICENSE-2.0.html
+
redhat-repository-techpreview
@@ -268,10 +247,12 @@
-
+
org.wildfly.bom
jboss-javaee-7.0-with-tools
@@ -310,4 +291,4 @@
1.2.5.Final-redhat-1
-
+
\ No newline at end of file
diff --git a/persistence-modules/elasticsearch/pom.xml b/persistence-modules/elasticsearch/pom.xml
index 654d43d622..f04cb3973f 100644
--- a/persistence-modules/elasticsearch/pom.xml
+++ b/persistence-modules/elasticsearch/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
elasticsearch
0.0.1-SNAPSHOT
@@ -29,5 +30,5 @@
6.3.1
-
-
+
+
\ No newline at end of file
diff --git a/persistence-modules/flyway-repair/pom.xml b/persistence-modules/flyway-repair/pom.xml
index 2c283cfc04..1a5384a916 100644
--- a/persistence-modules/flyway-repair/pom.xml
+++ b/persistence-modules/flyway-repair/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
flyway-repair
flyway-repair
@@ -39,7 +40,6 @@
-
h2
@@ -56,7 +56,6 @@
-
postgres
@@ -70,12 +69,10 @@
-
src/main/resources/application-${spring-boot.run.profiles}.properties
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/flyway/pom.xml b/persistence-modules/flyway/pom.xml
index c4a3363bdc..65534b6f0a 100644
--- a/persistence-modules/flyway/pom.xml
+++ b/persistence-modules/flyway/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
flyway
flyway
@@ -65,7 +66,6 @@
5.2.3
5.0.2
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/hbase/pom.xml b/persistence-modules/hbase/pom.xml
index f54f2d8985..e38b73e137 100644
--- a/persistence-modules/hbase/pom.xml
+++ b/persistence-modules/hbase/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
hbase
hbase
diff --git a/persistence-modules/hibernate-annotations/pom.xml b/persistence-modules/hibernate-annotations/pom.xml
index d3b786d6c8..e5c19915a4 100644
--- a/persistence-modules/hibernate-annotations/pom.xml
+++ b/persistence-modules/hibernate-annotations/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
hibernate-annotations
@@ -20,32 +21,28 @@
hibernate-core
${hibernate-core.version}
-
com.h2database
h2
${h2.version}
-
- org.apache.commons
- commons-lang3
- ${commons-lang3.version}
+ org.apache.commons
+ commons-lang3
+ ${commons-lang3.version}
-
org.hibernate
hibernate-testing
${hibernate-core.version}
-
org.hibernate
hibernate-spatial
${hibernate-core.version}
-
+
5.4.7.Final
1.4.200
@@ -55,4 +52,4 @@
1.4.200
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-enterprise/pom.xml b/persistence-modules/hibernate-enterprise/pom.xml
index c088cc1eca..dadfa211be 100644
--- a/persistence-modules/hibernate-enterprise/pom.xml
+++ b/persistence-modules/hibernate-enterprise/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
hibernate-enterprise
0.0.1-SNAPSHOT
@@ -92,4 +92,4 @@
2.3.4
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-exceptions/pom.xml b/persistence-modules/hibernate-exceptions/pom.xml
index f7eee22960..89e1f4ca7e 100644
--- a/persistence-modules/hibernate-exceptions/pom.xml
+++ b/persistence-modules/hibernate-exceptions/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
hibernate-exceptions
0.0.1-SNAPSHOT
@@ -35,4 +36,4 @@
2.3.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-jpa/pom.xml b/persistence-modules/hibernate-jpa/pom.xml
index e5056c413b..6d300c620b 100644
--- a/persistence-modules/hibernate-jpa/pom.xml
+++ b/persistence-modules/hibernate-jpa/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
hibernate-jpa
0.0.1-SNAPSHOT
@@ -97,4 +97,4 @@
2.1.7.RELEASE
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-libraries/pom.xml b/persistence-modules/hibernate-libraries/pom.xml
index 053ad05167..19537156aa 100644
--- a/persistence-modules/hibernate-libraries/pom.xml
+++ b/persistence-modules/hibernate-libraries/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
hibernate-libraries
@@ -125,7 +126,7 @@
- hibernate-types
+ hibernate-libraries
src/main/resources
@@ -158,7 +159,7 @@
-
+
@@ -182,4 +183,4 @@
2.1.3.RELEASE
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-mapping/README.md b/persistence-modules/hibernate-mapping/README.md
index b5d0cb2f99..984f49bb70 100644
--- a/persistence-modules/hibernate-mapping/README.md
+++ b/persistence-modules/hibernate-mapping/README.md
@@ -13,3 +13,4 @@ This module contains articles about Object-relational Mapping (ORM) with Hiberna
- [Hibernate – Mapping Date and Time](https://www.baeldung.com/hibernate-date-time)
- [Mapping LOB Data in Hibernate](https://www.baeldung.com/hibernate-lob)
- [FetchMode in Hibernate](https://www.baeldung.com/hibernate-fetchmode)
+- [Mapping PostgreSQL Array With Hibernate](https://www.baeldung.com/java-hibernate-map-postgresql-array)
diff --git a/persistence-modules/hibernate-mapping/pom.xml b/persistence-modules/hibernate-mapping/pom.xml
index ebc854a621..0248f0cb04 100644
--- a/persistence-modules/hibernate-mapping/pom.xml
+++ b/persistence-modules/hibernate-mapping/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
hibernate-mapping
hibernate-mapping
@@ -13,11 +13,22 @@
+
+ org.postgresql
+ postgresql
+ ${postgresql.version}
+ test
+
org.hibernate
hibernate-core
${hibernate.version}
+
+ com.vladmihalcea
+ hibernate-types-52
+ ${hibernate-types.version}
+
org.assertj
assertj-core
@@ -61,16 +72,17 @@
commons-io
${commons-io.version}
-
+ 42.2.20
5.4.12.Final
+ 2.10.4
3.8.0
6.0.16.Final
- 3.0.1-b11
+ 3.0.1-b11
1.0.3
1.3
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/CustomIntegerArrayType.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/CustomIntegerArrayType.java
new file mode 100644
index 0000000000..233bb95dc1
--- /dev/null
+++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/CustomIntegerArrayType.java
@@ -0,0 +1,85 @@
+package com.baeldung.hibernate.arraymapping;
+
+import java.io.Serializable;
+import java.sql.Array;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.Arrays;
+
+import org.hibernate.HibernateException;
+import org.hibernate.engine.spi.SharedSessionContractImplementor;
+import org.hibernate.usertype.UserType;
+
+public class CustomIntegerArrayType implements UserType {
+
+ @Override
+ public int[] sqlTypes() {
+ return new int[]{Types.ARRAY};
+ }
+
+ @Override
+ public Class returnedClass() {
+ return Integer[].class;
+ }
+
+ @Override
+ public boolean equals(Object x, Object y) throws HibernateException {
+ if (x instanceof Integer[] && y instanceof Integer[]) {
+ return Arrays.deepEquals((Integer[])x, (Integer[])y);
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode(Object x) throws HibernateException {
+ return Arrays.hashCode((Integer[])x);
+ }
+
+ @Override
+ public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner)
+ throws HibernateException, SQLException {
+ Array array = rs.getArray(names[0]);
+ return array != null ? array.getArray() : null;
+ }
+
+ @Override
+ public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session)
+ throws HibernateException, SQLException {
+ if (value != null && st != null) {
+ Array array = session.connection().createArrayOf("int", (Integer[])value);
+ st.setArray(index, array);
+ } else {
+ st.setNull(index, sqlTypes()[0]);
+ }
+ }
+
+ @Override
+ public Object deepCopy(Object value) throws HibernateException {
+ Integer[] a = (Integer[])value;
+ return Arrays.copyOf(a, a.length);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+
+ @Override
+ public Serializable disassemble(Object value) throws HibernateException {
+ return (Serializable) value;
+ }
+
+ @Override
+ public Object assemble(Serializable cached, Object owner) throws HibernateException {
+ return cached;
+ }
+
+ @Override
+ public Object replace(Object original, Object target, Object owner) throws HibernateException {
+ return original;
+ }
+
+}
diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/CustomStringArrayType.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/CustomStringArrayType.java
new file mode 100644
index 0000000000..7bd284def7
--- /dev/null
+++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/CustomStringArrayType.java
@@ -0,0 +1,85 @@
+package com.baeldung.hibernate.arraymapping;
+
+import java.io.Serializable;
+import java.sql.Array;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Types;
+import java.util.Arrays;
+
+import org.hibernate.HibernateException;
+import org.hibernate.engine.spi.SharedSessionContractImplementor;
+import org.hibernate.usertype.UserType;
+
+public class CustomStringArrayType implements UserType {
+
+ @Override
+ public int[] sqlTypes() {
+ return new int[]{Types.ARRAY};
+ }
+
+ @Override
+ public Class returnedClass() {
+ return String[].class;
+ }
+
+ @Override
+ public boolean equals(Object x, Object y) throws HibernateException {
+ if (x instanceof String[] && y instanceof String[]) {
+ return Arrays.deepEquals((String[])x, (String[])y);
+ } else {
+ return false;
+ }
+ }
+
+ @Override
+ public int hashCode(Object x) throws HibernateException {
+ return Arrays.hashCode((String[])x);
+ }
+
+ @Override
+ public Object nullSafeGet(ResultSet rs, String[] names, SharedSessionContractImplementor session, Object owner)
+ throws HibernateException, SQLException {
+ Array array = rs.getArray(names[0]);
+ return array != null ? array.getArray() : null;
+ }
+
+ @Override
+ public void nullSafeSet(PreparedStatement st, Object value, int index, SharedSessionContractImplementor session)
+ throws HibernateException, SQLException {
+ if (value != null && st != null) {
+ Array array = session.connection().createArrayOf("text", (String[])value);
+ st.setArray(index, array);
+ } else {
+ st.setNull(index, sqlTypes()[0]);
+ }
+ }
+
+ @Override
+ public Object deepCopy(Object value) throws HibernateException {
+ String[] a = (String[])value;
+ return Arrays.copyOf(a, a.length);
+ }
+
+ @Override
+ public boolean isMutable() {
+ return false;
+ }
+
+ @Override
+ public Serializable disassemble(Object value) throws HibernateException {
+ return (Serializable) value;
+ }
+
+ @Override
+ public Object assemble(Serializable cached, Object owner) throws HibernateException {
+ return cached;
+ }
+
+ @Override
+ public Object replace(Object original, Object target, Object owner) throws HibernateException {
+ return original;
+ }
+
+}
diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/HibernateSessionUtil.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/HibernateSessionUtil.java
new file mode 100644
index 0000000000..dc3ec93a9d
--- /dev/null
+++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/HibernateSessionUtil.java
@@ -0,0 +1,61 @@
+package com.baeldung.hibernate.arraymapping;
+
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.net.URL;
+import java.util.Properties;
+
+import org.apache.commons.lang3.StringUtils;
+import org.hibernate.SessionFactory;
+import org.hibernate.boot.Metadata;
+import org.hibernate.boot.MetadataSources;
+import org.hibernate.boot.registry.StandardServiceRegistryBuilder;
+import org.hibernate.service.ServiceRegistry;
+
+import com.baeldung.hibernate.arraymapping.User;
+
+public class HibernateSessionUtil {
+
+ private static SessionFactory sessionFactory;
+ private static String PROPERTY_FILE_NAME;
+
+ public static SessionFactory getSessionFactory() throws IOException {
+ return getSessionFactory(null);
+ }
+
+ public static SessionFactory getSessionFactory(String propertyFileName) throws IOException {
+ PROPERTY_FILE_NAME = propertyFileName;
+ if (sessionFactory == null) {
+ ServiceRegistry serviceRegistry = configureServiceRegistry();
+ sessionFactory = makeSessionFactory(serviceRegistry);
+ }
+ return sessionFactory;
+ }
+
+ private static SessionFactory makeSessionFactory(ServiceRegistry serviceRegistry) {
+ MetadataSources metadataSources = new MetadataSources(serviceRegistry);
+ metadataSources.addAnnotatedClass(User.class);
+
+ Metadata metadata = metadataSources.buildMetadata();
+ return metadata.getSessionFactoryBuilder()
+ .build();
+
+ }
+
+ private static ServiceRegistry configureServiceRegistry() throws IOException {
+ Properties properties = getProperties();
+ return new StandardServiceRegistryBuilder().applySettings(properties)
+ .build();
+ }
+
+ private static Properties getProperties() throws IOException {
+ Properties properties = new Properties();
+ URL propertiesURL = Thread.currentThread()
+ .getContextClassLoader()
+ .getResource(StringUtils.defaultString(PROPERTY_FILE_NAME, "hibernate_postgres.properties"));
+ try (FileInputStream inputStream = new FileInputStream(propertiesURL.getFile())) {
+ properties.load(inputStream);
+ }
+ return properties;
+ }
+}
diff --git a/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/User.java b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/User.java
new file mode 100644
index 0000000000..018bedc349
--- /dev/null
+++ b/persistence-modules/hibernate-mapping/src/main/java/com/baeldung/hibernate/arraymapping/User.java
@@ -0,0 +1,82 @@
+package com.baeldung.hibernate.arraymapping;
+
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.Id;
+
+import org.hibernate.annotations.Type;
+
+import com.vladmihalcea.hibernate.type.array.StringArrayType;
+
+import org.hibernate.annotations.*;
+
+@TypeDefs({
+ @TypeDef(
+ name = "string-array",
+ typeClass = StringArrayType.class
+ )
+})
+@Entity
+public class User {
+
+ @Id
+ private Long id;
+
+ private String name;
+
+ @Column(columnDefinition = "text[]")
+ @Type(type = "com.baeldung.hibernate.arraymapping.CustomStringArrayType")
+ private String[] roles;
+
+ @Column(columnDefinition = "int[]")
+ @Type(type = "com.baeldung.hibernate.arraymapping.CustomIntegerArrayType")
+ private Integer[] locations;
+
+ @Type(type = "string-array")
+ @Column(
+ name = "phone_numbers",
+ columnDefinition = "text[]"
+ )
+ private String[] phoneNumbers;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String[] getRoles() {
+ return roles;
+ }
+
+ public void setRoles(String[] roles) {
+ this.roles = roles;
+ }
+
+ public Integer[] getLocations() {
+ return locations;
+ }
+
+ public void setLocations(Integer[] locations) {
+ this.locations = locations;
+ }
+
+ public String[] getPhoneNumbers() {
+ return phoneNumbers;
+ }
+
+ public void setPhoneNumbers(String[] phoneNumbers) {
+ this.phoneNumbers = phoneNumbers;
+ }
+
+}
diff --git a/persistence-modules/hibernate-mapping/src/test/java/com/baeldung/hibernate/arraymapping/ArrayMappingIntegrationTest.java b/persistence-modules/hibernate-mapping/src/test/java/com/baeldung/hibernate/arraymapping/ArrayMappingIntegrationTest.java
new file mode 100644
index 0000000000..ba0ccc2aa2
--- /dev/null
+++ b/persistence-modules/hibernate-mapping/src/test/java/com/baeldung/hibernate/arraymapping/ArrayMappingIntegrationTest.java
@@ -0,0 +1,133 @@
+package com.baeldung.hibernate.arraymapping;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+import java.io.IOException;
+
+import org.hibernate.HibernateException;
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+
+
+public class ArrayMappingIntegrationTest {
+
+ private Session session;
+ private Transaction transaction;
+
+ @BeforeEach
+ public void setup() throws IOException {
+ try {
+ session = HibernateSessionUtil.getSessionFactory().openSession();
+ transaction = session.beginTransaction();
+
+ bootstrapData();
+
+ } catch (HibernateException | IOException e) {
+ System.out.println("Can't connect to a PostgreSQL DB");
+ }
+ }
+
+ @AfterEach
+ public void cleanup() {
+ if (null != session) {
+ transaction.rollback();
+ session.close();
+ }
+ }
+
+ @Test
+ public void givenArrayMapping_whenQueried_thenReturnArraysFromDB() throws HibernateException, IOException {
+ if (null != session) {
+ User user = session.find(User.class, 1L);
+
+ assertEquals("john", user.getName());
+ assertEquals("superuser", user.getRoles()[0]);
+ assertEquals("admin", user.getRoles()[1]);
+ assertEquals(100, user.getLocations()[0]);
+ assertEquals(389, user.getLocations()[1]);
+ assertEquals("7000000000", user.getPhoneNumbers()[0]);
+ assertEquals("8000000000", user.getPhoneNumbers()[1]);
+ }
+ }
+
+ @Test
+ public void givenArrayMapping_whenArraysAreInserted_thenPersistInDB() throws HibernateException, IOException {
+ if (null != session) {
+ transaction = session.beginTransaction();
+
+ User user = new User();
+ user.setId(2L);
+ user.setName("smith");
+
+ String[] roles = {"admin", "employee"};
+ user.setRoles(roles);
+
+ Integer[] locations = {190, 578};
+ user.setLocations(locations);
+
+ session.persist(user);
+ session.flush();
+ session.clear();
+
+ transaction.commit();
+
+ User userDBObj = session.find(User.class, 2L);
+
+ assertEquals("smith", userDBObj.getName());
+ assertEquals("admin", userDBObj.getRoles()[0]);
+ assertEquals(578, userDBObj.getLocations()[1]);
+ }
+ }
+
+ @Test
+ public void givenArrayMapping_whenArrayIsUpdated_thenPersistInDB() throws HibernateException, IOException {
+ if (null != session) {
+ transaction = session.beginTransaction();
+
+ User user = session.find(User.class, 1L);
+
+ String[] updatedRoles = {"superuser", "superadmin"};
+ String[] updatedPhoneNumbers = {"9000000000"};
+
+ user.setRoles(updatedRoles);
+ user.setPhoneNumbers(updatedPhoneNumbers);
+
+ session.persist(user);
+ session.flush();
+ session.clear();
+
+ User userDBObj = session.find(User.class, 1L);
+
+ assertEquals("john", userDBObj.getName());
+ assertEquals("superadmin", userDBObj.getRoles()[1]);
+ assertEquals("9000000000", userDBObj.getPhoneNumbers()[0]);
+ }
+ }
+
+ public void bootstrapData() {
+ session.createQuery("delete from User").executeUpdate();
+
+ User user = new User();
+ user.setId(1L);
+ user.setName("john");
+
+ String[] roles = {"superuser", "admin"};
+ user.setRoles(roles);
+
+ Integer[] locations = {100, 389};
+ user.setLocations(locations);
+
+ String[] phoneNumbers = {"7000000000", "8000000000"};
+ user.setPhoneNumbers(phoneNumbers);
+
+ session.persist(user);
+ session.flush();
+ session.clear();
+
+ transaction.commit();
+ }
+
+}
diff --git a/persistence-modules/hibernate-mapping/src/test/resources/hibernate_postgres.properties b/persistence-modules/hibernate-mapping/src/test/resources/hibernate_postgres.properties
new file mode 100644
index 0000000000..72e3dcd781
--- /dev/null
+++ b/persistence-modules/hibernate-mapping/src/test/resources/hibernate_postgres.properties
@@ -0,0 +1,14 @@
+hibernate.connection.driver_class=org.postgresql.Driver
+hibernate.connection.url=jdbc:postgresql://localhost:5432/postgres
+hibernate.connection.username=web
+hibernate.connection.autocommit=true
+jdbc.password=
+
+hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
+hibernate.show_sql=true
+hibernate.hbm2ddl.auto=none
+
+hibernate.c3p0.min_size=5
+hibernate.c3p0.max_size=20
+hibernate.c3p0.acquire_increment=5
+hibernate.c3p0.timeout=1800
diff --git a/persistence-modules/hibernate-ogm/pom.xml b/persistence-modules/hibernate-ogm/pom.xml
index 8f42c28eee..58098ebb65 100644
--- a/persistence-modules/hibernate-ogm/pom.xml
+++ b/persistence-modules/hibernate-ogm/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
hibernate-ogm
0.0.1-SNAPSHOT
@@ -45,5 +46,5 @@
1.4
5.5.23.Final
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate-queries/pom.xml b/persistence-modules/hibernate-queries/pom.xml
index d44bc0f8ae..4a8c578aba 100644
--- a/persistence-modules/hibernate-queries/pom.xml
+++ b/persistence-modules/hibernate-queries/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
hibernate-queries
0.0.1-SNAPSHOT
@@ -63,4 +63,4 @@
3.8.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/hibernate5/pom.xml b/persistence-modules/hibernate5/pom.xml
index fe0e7680ab..9b4ffff739 100644
--- a/persistence-modules/hibernate5/pom.xml
+++ b/persistence-modules/hibernate5/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
hibernate5
0.0.1-SNAPSHOT
@@ -55,7 +55,6 @@
jackson-databind
${jackson.version}
-
org.openjdk.jmh
jmh-generator-annprocess
@@ -70,4 +69,4 @@
3.8.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/influxdb/pom.xml b/persistence-modules/influxdb/pom.xml
index 23ae64dca1..401e4c3ea7 100644
--- a/persistence-modules/influxdb/pom.xml
+++ b/persistence-modules/influxdb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
influxdb
0.1-SNAPSHOT
@@ -20,7 +21,6 @@
influxdb-java
${influxdb.sdk.version}
-
org.projectlombok
lombok
@@ -34,4 +34,4 @@
2.8
-
+
\ No newline at end of file
diff --git a/persistence-modules/java-cassandra/pom.xml b/persistence-modules/java-cassandra/pom.xml
index 091efaeff4..ad80fc8a83 100644
--- a/persistence-modules/java-cassandra/pom.xml
+++ b/persistence-modules/java-cassandra/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
java-cassandra
@@ -25,14 +26,12 @@
-
org.cassandraunit
cassandra-unit
${cassandra-unit.version}
-
com.datastax.oss
@@ -53,4 +52,4 @@
4.1.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/java-cockroachdb/pom.xml b/persistence-modules/java-cockroachdb/pom.xml
index e8c6365ca3..588ad29cb1 100644
--- a/persistence-modules/java-cockroachdb/pom.xml
+++ b/persistence-modules/java-cockroachdb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-cockroachdb
1.0-SNAPSHOT
diff --git a/persistence-modules/java-jdbi/pom.xml b/persistence-modules/java-jdbi/pom.xml
index eb0de45593..e08b3a3c35 100644
--- a/persistence-modules/java-jdbi/pom.xml
+++ b/persistence-modules/java-jdbi/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-jdbi
1.0-SNAPSHOT
diff --git a/persistence-modules/java-jpa-2/pom.xml b/persistence-modules/java-jpa-2/pom.xml
index ab5bb39dfc..daa775f39d 100644
--- a/persistence-modules/java-jpa-2/pom.xml
+++ b/persistence-modules/java-jpa-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-jpa-2
java-jpa-2
@@ -27,14 +28,12 @@
h2
${h2.version}
-
javax.persistence
javax.persistence-api
${javax.persistence-api.version}
-
org.eclipse.persistence
@@ -59,7 +58,6 @@
querydsl-jpa
${querydsl.version}
-
org.assertj
assertj-core
@@ -149,4 +147,4 @@
4.3.1
-
+
\ No newline at end of file
diff --git a/persistence-modules/java-jpa-3/pom.xml b/persistence-modules/java-jpa-3/pom.xml
index f931cd90b8..d81bfca5bd 100644
--- a/persistence-modules/java-jpa-3/pom.xml
+++ b/persistence-modules/java-jpa-3/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
java-jpa-3
java-jpa-3
@@ -48,7 +49,6 @@
javax.persistence-api
${javax.persistence-api.version}
-
org.eclipse.persistence
@@ -68,6 +68,12 @@
${assertj.version}
test
+
+ junit
+ junit
+ ${junit.version}
+ test
+
@@ -95,4 +101,4 @@
3.0.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/java-jpa-3/src/main/java/com/baeldung/jpa/IdGeneration/User.java b/persistence-modules/java-jpa-3/src/main/java/com/baeldung/jpa/IdGeneration/User.java
new file mode 100644
index 0000000000..88e742adce
--- /dev/null
+++ b/persistence-modules/java-jpa-3/src/main/java/com/baeldung/jpa/IdGeneration/User.java
@@ -0,0 +1,41 @@
+package com.baeldung.jpa.IdGeneration;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+
+@Entity
+public class User {
+
+ @Id
+// @GeneratedValue(strategy = GenerationType.SEQUENCE)
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private long id;
+ private String username;
+ private String password;
+
+ public long getId() {
+ return id;
+ }
+
+ public void setId(long id) {
+ this.id = id;
+ }
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+
+ public String getPassword() {
+ return password;
+ }
+
+ public void setPassword(String password) {
+ this.password = password;
+ }
+}
diff --git a/persistence-modules/java-jpa-3/src/main/java/com/baeldung/jpa/IdGeneration/UserService.java b/persistence-modules/java-jpa-3/src/main/java/com/baeldung/jpa/IdGeneration/UserService.java
new file mode 100644
index 0000000000..9c34ef9bb4
--- /dev/null
+++ b/persistence-modules/java-jpa-3/src/main/java/com/baeldung/jpa/IdGeneration/UserService.java
@@ -0,0 +1,19 @@
+package com.baeldung.jpa.IdGeneration;
+
+import javax.persistence.EntityManager;
+import javax.transaction.Transactional;
+
+public class UserService {
+
+ EntityManager entityManager;
+
+ public UserService(EntityManager entityManager) {
+ this.entityManager = entityManager;
+ }
+
+ @Transactional
+ public long saveUser(User user){
+ entityManager.persist(user);
+ return user.getId();
+ }
+}
diff --git a/persistence-modules/java-jpa-3/src/main/resources/META-INF/persistence.xml b/persistence-modules/java-jpa-3/src/main/resources/META-INF/persistence.xml
index 19ecae8491..bc41f35c01 100644
--- a/persistence-modules/java-jpa-3/src/main/resources/META-INF/persistence.xml
+++ b/persistence-modules/java-jpa-3/src/main/resources/META-INF/persistence.xml
@@ -97,4 +97,20 @@
+
+
+ org.hibernate.jpa.HibernatePersistenceProvider
+ com.baeldung.jpa.IdGeneration.User
+ true
+
+
+
+
+
+
+
+
+
+
+
diff --git a/persistence-modules/java-jpa-3/src/test/java/com/baeldung/jpa/IdGeneration/IdGenerationIntegrationTest.java b/persistence-modules/java-jpa-3/src/test/java/com/baeldung/jpa/IdGeneration/IdGenerationIntegrationTest.java
new file mode 100644
index 0000000000..941ad52344
--- /dev/null
+++ b/persistence-modules/java-jpa-3/src/test/java/com/baeldung/jpa/IdGeneration/IdGenerationIntegrationTest.java
@@ -0,0 +1,47 @@
+package com.baeldung.jpa.IdGeneration;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import javax.persistence.EntityManager;
+import javax.persistence.EntityManagerFactory;
+import javax.persistence.Persistence;
+import java.util.UUID;
+
+public class IdGenerationIntegrationTest {
+
+ private static EntityManager entityManager;
+ private static UserService service;
+
+ @BeforeClass
+ public static void setup() {
+ EntityManagerFactory factory = Persistence.createEntityManagerFactory("jpa-h2-id-generation");
+ entityManager = factory.createEntityManager();
+ service = new UserService(entityManager);
+ }
+
+ @Test
+ public void whenNewUserIsPersisted_thenEntityHasNoId() {
+ User user = new User();
+ user.setUsername("test");
+ user.setPassword(UUID.randomUUID().toString());
+
+ long index = service.saveUser(user);
+ Assert.assertEquals(0L, index);
+ }
+
+ @Test
+ public void whenTransactionIsControlled_thenEntityHasId() {
+ User user = new User();
+ user.setUsername("test");
+ user.setPassword(UUID.randomUUID().toString());
+
+ entityManager.getTransaction().begin();
+ long index = service.saveUser(user);
+ entityManager.getTransaction().commit();
+
+ Assert.assertEquals(2L, index);
+ }
+
+}
diff --git a/persistence-modules/java-jpa/pom.xml b/persistence-modules/java-jpa/pom.xml
index 3601721dac..bb87c10edb 100644
--- a/persistence-modules/java-jpa/pom.xml
+++ b/persistence-modules/java-jpa/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
java-jpa
java-jpa
@@ -28,15 +28,13 @@
h2
${h2.version}
-
-
+
javax.persistence
javax.persistence-api
${javax.persistence-api.version}
-
-
+
org.eclipse.persistence
eclipselink
@@ -81,7 +79,6 @@
-
org.codehaus.mojo
build-helper-maven-plugin
diff --git a/persistence-modules/java-mongodb/pom.xml b/persistence-modules/java-mongodb/pom.xml
index d62240927a..15d904b12c 100644
--- a/persistence-modules/java-mongodb/pom.xml
+++ b/persistence-modules/java-mongodb/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
java-mongodb
1.0-SNAPSHOT
@@ -25,7 +25,6 @@
mongo-java-driver
${mongo.version}
-
dev.morphia.morphia
core
@@ -39,4 +38,4 @@
1.5.3
-
+
\ No newline at end of file
diff --git a/persistence-modules/jnosql/jnosql-artemis/pom.xml b/persistence-modules/jnosql/jnosql-artemis/pom.xml
index 8570d1072f..0c1a6967d3 100644
--- a/persistence-modules/jnosql/jnosql-artemis/pom.xml
+++ b/persistence-modules/jnosql/jnosql-artemis/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jnosql-artemis
jnosql-artemis
@@ -83,4 +83,4 @@
8.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/jnosql/jnosql-diana/pom.xml b/persistence-modules/jnosql/jnosql-diana/pom.xml
index d5746eef05..f1a4e746cf 100644
--- a/persistence-modules/jnosql/jnosql-diana/pom.xml
+++ b/persistence-modules/jnosql/jnosql-diana/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jnosql-diana
jnosql-diana
@@ -13,7 +13,7 @@
-
+
org.jnosql.diana
diana-document
@@ -24,8 +24,7 @@
mongodb-driver
${jnosql.version}
-
-
+
org.jnosql.diana
diana-column
@@ -36,8 +35,7 @@
cassandra-driver
${jnosql.version}
-
-
+
org.jnosql.diana
diana-key-value
diff --git a/persistence-modules/jnosql/pom.xml b/persistence-modules/jnosql/pom.xml
index 81c62ee562..090350e6e3 100644
--- a/persistence-modules/jnosql/pom.xml
+++ b/persistence-modules/jnosql/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.jnosql
jnosql
@@ -24,4 +24,4 @@
0.0.6
-
+
\ No newline at end of file
diff --git a/persistence-modules/jooq/pom.xml b/persistence-modules/jooq/pom.xml
index 2dababb02d..f4751f412a 100644
--- a/persistence-modules/jooq/pom.xml
+++ b/persistence-modules/jooq/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jooq
0.0.1-SNAPSHOT
@@ -49,4 +49,4 @@
1.4.200
-
+
\ No newline at end of file
diff --git a/persistence-modules/jpa-hibernate-cascade-type/pom.xml b/persistence-modules/jpa-hibernate-cascade-type/pom.xml
index e8117290b0..467fe11bc3 100644
--- a/persistence-modules/jpa-hibernate-cascade-type/pom.xml
+++ b/persistence-modules/jpa-hibernate-cascade-type/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
jpa-hibernate-cascade-type
diff --git a/persistence-modules/liquibase/pom.xml b/persistence-modules/liquibase/pom.xml
index af1af2259e..2fc5803037 100644
--- a/persistence-modules/liquibase/pom.xml
+++ b/persistence-modules/liquibase/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
liquibase
liquibase
diff --git a/persistence-modules/orientdb/pom.xml b/persistence-modules/orientdb/pom.xml
index 5b28fb01b0..1468f5b611 100644
--- a/persistence-modules/orientdb/pom.xml
+++ b/persistence-modules/orientdb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
orientdb
0.0.1-SNAPSHOT
@@ -42,4 +43,4 @@
2.6.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/persistence-libraries/pom.xml b/persistence-modules/persistence-libraries/pom.xml
index 42f3a33a40..a3f0ccb728 100644
--- a/persistence-modules/persistence-libraries/pom.xml
+++ b/persistence-modules/persistence-libraries/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
persistence-libraries
1.0-SNAPSHOT
@@ -31,4 +32,4 @@
1.6.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml
index 32423a42dd..5e0cd59d18 100644
--- a/persistence-modules/pom.xml
+++ b/persistence-modules/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
persistence-modules
persistence-modules
@@ -65,7 +66,6 @@
spring-data-elasticsearch
spring-data-gemfire
spring-data-geode
-
spring-data-jpa-annotations
spring-data-jpa-crud
spring-data-jpa-enterprise
@@ -74,16 +74,14 @@
spring-data-jpa-query-2
spring-data-jpa-repo
spring-data-jpa-repo-2
-
spring-data-jdbc
-
spring-data-keyvalue
spring-data-mongodb
spring-data-neo4j
spring-data-redis
spring-data-solr
spring-hibernate-3
- spring-hibernate-5
+ spring-hibernate-5
spring-jpa
spring-jpa-2
spring-jdbc
@@ -101,4 +99,5 @@
5.6.2
4.13
-
+
+
\ No newline at end of file
diff --git a/persistence-modules/querydsl/pom.xml b/persistence-modules/querydsl/pom.xml
index a611c309b6..c4b01d787c 100644
--- a/persistence-modules/querydsl/pom.xml
+++ b/persistence-modules/querydsl/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
querydsl
0.1-SNAPSHOT
@@ -20,14 +21,12 @@
querydsl-jpa
${querydsl.version}
-
com.querydsl
querydsl-apt
${querydsl.version}
provided
-
org.hibernate
@@ -35,14 +34,12 @@
${hibernate.version}
compile
-
org.hibernate.javax.persistence
hibernate-jpa-2.1-api
${hibernate-jpa.version}
compile
-
commons-dbcp
commons-dbcp
@@ -50,7 +47,6 @@
jar
compile
-
commons-pool
commons-pool
@@ -58,14 +54,12 @@
jar
compile
-
org.hsqldb
hsqldb
${hsqldb.version}
-
org.springframework
@@ -78,13 +72,11 @@
-
org.springframework
spring-webmvc
${spring.version}
-
org.springframework
spring-orm
@@ -92,13 +84,11 @@
jar
compile
-
org.springframework
spring-aop
${spring.version}
-
org.springframework
spring-test
@@ -121,7 +111,6 @@
-proc:none
-
com.mysema.maven
diff --git a/persistence-modules/r2dbc/pom.xml b/persistence-modules/r2dbc/pom.xml
index 01f1b351cd..ae4ca4d91d 100644
--- a/persistence-modules/r2dbc/pom.xml
+++ b/persistence-modules/r2dbc/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.examples.r2dbc
r2dbc
@@ -14,7 +14,7 @@
parent-boot-2
0.0.1-SNAPSHOT
../../parent-boot-2
-
+
@@ -25,7 +25,6 @@
org.springframework.boot
spring-boot-starter-validation
-
org.springframework.boot
spring-boot-starter-test
@@ -36,15 +35,12 @@
reactor-test
test
-
-
io.r2dbc
r2dbc-h2
${r2dbc-h2.version}
-
org.springframework.boot
spring-boot-configuration-processor
@@ -68,7 +64,6 @@
0.8.1.RELEASE
1.4.200
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/redis/pom.xml b/persistence-modules/redis/pom.xml
index fa82bebc64..c407482788 100644
--- a/persistence-modules/redis/pom.xml
+++ b/persistence-modules/redis/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
redis
0.1-SNAPSHOT
@@ -19,17 +20,14 @@
org.springframework.boot
spring-boot-starter
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-redis
-
redis.clients
jedis
@@ -56,7 +54,7 @@
-
+
0.6
3.13.1
3.3.0
@@ -64,4 +62,4 @@
-
+
\ No newline at end of file
diff --git a/persistence-modules/sirix/pom.xml b/persistence-modules/sirix/pom.xml
index da9695081c..85379dc566 100644
--- a/persistence-modules/sirix/pom.xml
+++ b/persistence-modules/sirix/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
io.sirix
sirix
@@ -53,4 +53,4 @@
6.1
-
+
\ No newline at end of file
diff --git a/persistence-modules/solr/pom.xml b/persistence-modules/solr/pom.xml
index fd993e0c67..de0bd5a4a2 100644
--- a/persistence-modules/solr/pom.xml
+++ b/persistence-modules/solr/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
solr
diff --git a/persistence-modules/spring-boot-mysql/pom.xml b/persistence-modules/spring-boot-mysql/pom.xml
index 834d1d1e64..ed3f7d9279 100644
--- a/persistence-modules/spring-boot-mysql/pom.xml
+++ b/persistence-modules/spring-boot-mysql/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-boot-mysql
0.1.0
@@ -39,7 +40,6 @@
8.0.12
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-2/pom.xml b/persistence-modules/spring-boot-persistence-2/pom.xml
index ca6ec93340..b51ab17659 100644
--- a/persistence-modules/spring-boot-persistence-2/pom.xml
+++ b/persistence-modules/spring-boot-persistence-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.boot.persistence
spring-boot-persistence-2
@@ -31,13 +31,11 @@
pom
import
-
org.jdbi
jdbi3-spring4
${jdbi.version}
-
org.jdbi
jdbi3-sqlobject
@@ -51,22 +49,18 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.jdbi
jdbi3-spring4
-
org.jdbi
jdbi3-sqlobject
-
org.springframework.boot
spring-boot-devtools
@@ -93,23 +87,19 @@
spring-boot-starter-test
test
-
com.mchange
c3p0
${c3p0.version}
-
org.apache.commons
commons-dbcp2
-
org.apache.tomcat
tomcat-jdbc
-
mysql
mysql-connector-java
@@ -126,7 +116,6 @@
org.hsqldb
hsqldb
-
com.oracle.database.jdbc
ojdbc8
@@ -160,4 +149,4 @@
19.6.0.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-h2/pom.xml b/persistence-modules/spring-boot-persistence-h2/pom.xml
index c06c35cfee..023e20837b 100644
--- a/persistence-modules/spring-boot-persistence-h2/pom.xml
+++ b/persistence-modules/spring-boot-persistence-h2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.h2db
spring-boot-persistence-h2
@@ -46,7 +46,6 @@
com.baeldung.h2db.demo.server.SpringBootApp
1.0.4
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence-mongodb/pom.xml b/persistence-modules/spring-boot-persistence-mongodb/pom.xml
index 5167483aa3..724fa38f7e 100644
--- a/persistence-modules/spring-boot-persistence-mongodb/pom.xml
+++ b/persistence-modules/spring-boot-persistence-mongodb/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-boot-persistence-mongodb
spring-boot-persistence-mongodb
@@ -36,6 +36,4 @@
-
-
\ No newline at end of file
diff --git a/persistence-modules/spring-boot-persistence/pom.xml b/persistence-modules/spring-boot-persistence/pom.xml
index 9e44a7b9c1..deac0c2a57 100644
--- a/persistence-modules/spring-boot-persistence/pom.xml
+++ b/persistence-modules/spring-boot-persistence/pom.xml
@@ -78,4 +78,4 @@
2.0.1.Final
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-cassandra-reactive/pom.xml b/persistence-modules/spring-data-cassandra-reactive/pom.xml
index f2f71bceac..630e13583b 100644
--- a/persistence-modules/spring-data-cassandra-reactive/pom.xml
+++ b/persistence-modules/spring-data-cassandra-reactive/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-data-cassandra-reactive
@@ -56,4 +57,4 @@
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-cassandra/pom.xml b/persistence-modules/spring-data-cassandra/pom.xml
index 9de1cbf20e..e43e3821ae 100644
--- a/persistence-modules/spring-data-cassandra/pom.xml
+++ b/persistence-modules/spring-data-cassandra/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-cassandra
spring-data-cassandra
@@ -107,4 +108,4 @@
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-cosmosdb/pom.xml b/persistence-modules/spring-data-cosmosdb/pom.xml
index 2eb6a6b038..30dc4f999c 100644
--- a/persistence-modules/spring-data-cosmosdb/pom.xml
+++ b/persistence-modules/spring-data-cosmosdb/pom.xml
@@ -6,17 +6,14 @@
spring-data-cosmosdb
spring-data-cosmosdb
tutorial for spring-data-cosmosdb
+
com.baeldung
parent-boot-2
0.0.1-SNAPSHOT
../../parent-boot-2
-
-
- 2.3.0
-
-
+
org.springframework.boot
@@ -37,7 +34,7 @@
lombok
-
+
@@ -47,4 +44,8 @@
-
+
+ 2.3.0
+
+
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-couchbase-2/pom.xml b/persistence-modules/spring-data-couchbase-2/pom.xml
index 0a20a3ff0e..c860f809fd 100644
--- a/persistence-modules/spring-data-couchbase-2/pom.xml
+++ b/persistence-modules/spring-data-couchbase-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
spring-data-couchbase-2
@@ -38,20 +38,17 @@
spring-data-couchbase
${spring-data-couchbase.version}
-
org.hibernate
hibernate-validator
${hibernate-validator.version}
-
joda-time
joda-time
${joda-time.version}
-
org.springframework
@@ -79,4 +76,4 @@
3.0.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-dynamodb/pom.xml b/persistence-modules/spring-data-dynamodb/pom.xml
index 377e35b635..28127179c2 100644
--- a/persistence-modules/spring-data-dynamodb/pom.xml
+++ b/persistence-modules/spring-data-dynamodb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-dynamodb
spring-data-dynamodb
@@ -184,4 +185,4 @@
3.1.1
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-eclipselink/pom.xml b/persistence-modules/spring-data-eclipselink/pom.xml
index 4ae43de07a..a344d64864 100644
--- a/persistence-modules/spring-data-eclipselink/pom.xml
+++ b/persistence-modules/spring-data-eclipselink/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-eclipselink
spring-data-eclipselink
@@ -67,4 +68,4 @@
2.7.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-elasticsearch/pom.xml b/persistence-modules/spring-data-elasticsearch/pom.xml
index 6a983145ee..7e91a5b15c 100644
--- a/persistence-modules/spring-data-elasticsearch/pom.xml
+++ b/persistence-modules/spring-data-elasticsearch/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
spring-data-elasticsearch
spring-data-elasticsearch
@@ -18,31 +19,26 @@
spring-web
${spring.version}
-
org.springframework.data
spring-data-elasticsearch
${spring-data-elasticsearch.version}
-
org.elasticsearch
elasticsearch
${elasticsearch.version}
-
com.alibaba
fastjson
${fastjson.version}
-
org.locationtech.spatial4j
spatial4j
${spatial4j.version}
-
org.locationtech.jts
jts-core
@@ -54,7 +50,6 @@
-
org.springframework
spring-test
@@ -70,4 +65,5 @@
0.7
1.15.0
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-gemfire/pom.xml b/persistence-modules/spring-data-gemfire/pom.xml
index a0cc4d5360..53ce67fb6d 100644
--- a/persistence-modules/spring-data-gemfire/pom.xml
+++ b/persistence-modules/spring-data-gemfire/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-gemfire
spring-data-gemfire
@@ -18,7 +19,6 @@
spring-data-gemfire
${spring-data-gemfire-version}
-
com.gemstone.gemfire
gemfire
@@ -30,7 +30,6 @@
google-collections
${google-collections-version}
-
org.springframework
spring-context
diff --git a/persistence-modules/spring-data-geode/pom.xml b/persistence-modules/spring-data-geode/pom.xml
index ebdb37299e..0673701f42 100644
--- a/persistence-modules/spring-data-geode/pom.xml
+++ b/persistence-modules/spring-data-geode/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-geode
spring-data-geode
@@ -41,7 +42,6 @@
spring-geode-starter
${spring-geode-starter-version}
-
org.springframework.boot
spring-boot-autoconfigure
diff --git a/persistence-modules/spring-data-jdbc/pom.xml b/persistence-modules/spring-data-jdbc/pom.xml
index 15f8d7fb95..2672405dd6 100644
--- a/persistence-modules/spring-data-jdbc/pom.xml
+++ b/persistence-modules/spring-data-jdbc/pom.xml
@@ -1,32 +1,30 @@
- 4.0.0
-
- com.baeldung
- parent-boot-2
- 0.0.1-SNAPSHOT
- ../../parent-boot-2
-
- spring-data-jdbc
- spring-data-jdbc
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+
+ com.baeldung
+ parent-boot-2
+ 0.0.1-SNAPSHOT
+ ../../parent-boot-2
+
+ spring-data-jdbc
+ spring-data-jdbc
-
-
- org.springframework.boot
- spring-boot-starter
-
-
- org.springframework.boot
- spring-boot-starter-data-jdbc
-
-
- com.h2database
- h2
- runtime
-
-
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jdbc
+
+
+ com.h2database
+ h2
+ runtime
+
+
-
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-annotations/pom.xml b/persistence-modules/spring-data-jpa-annotations/pom.xml
index ff30790eaf..113d6e5dc6 100644
--- a/persistence-modules/spring-data-jpa-annotations/pom.xml
+++ b/persistence-modules/spring-data-jpa-annotations/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-data-jpa-annotations
@@ -25,12 +26,10 @@
org.hibernate
hibernate-envers
-
com.h2database
h2
-
org.testcontainers
@@ -38,13 +37,11 @@
${testcontainers.postgresql.version}
test
-
org.postgresql
postgresql
-
org.springframework.security
spring-security-test
@@ -59,7 +56,6 @@
spring-boot-starter-test
test
-
com.google.guava
guava
@@ -72,7 +68,6 @@
1.10.6
42.2.5
21.0
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Address.java b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Address.java
new file mode 100644
index 0000000000..95a3708173
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Address.java
@@ -0,0 +1,25 @@
+package com.baeldung.attribute.override.entity;
+
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class Address {
+ private String name;
+ private String city;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Brand.java b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Brand.java
new file mode 100644
index 0000000000..9918cbaa70
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Brand.java
@@ -0,0 +1,29 @@
+package com.baeldung.attribute.override.entity;
+
+import javax.persistence.Embeddable;
+import javax.persistence.Embedded;
+import java.time.LocalDate;
+
+@Embeddable
+public class Brand {
+ private String name;
+ private LocalDate foundationDate;
+ @Embedded
+ private Address address;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public LocalDate getFoundationDate() {
+ return foundationDate;
+ }
+
+ public void setFoundationDate(LocalDate foundationDate) {
+ this.foundationDate = foundationDate;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Car.java b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Car.java
new file mode 100644
index 0000000000..5421090e58
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Car.java
@@ -0,0 +1,54 @@
+package com.baeldung.attribute.override.entity;
+
+import javax.persistence.AttributeOverride;
+import javax.persistence.AttributeOverrides;
+import javax.persistence.Column;
+import javax.persistence.ElementCollection;
+import javax.persistence.Embedded;
+import javax.persistence.Entity;
+import java.util.Map;
+
+@Entity
+@AttributeOverride(name = "identifier", column = @Column(name = "VIN"))
+public class Car extends Vehicle {
+
+ private String model;
+ private String name;
+ @Embedded
+ @AttributeOverrides({
+ @AttributeOverride(name = "name", column = @Column(name = "BRAND_NAME", length = 5)),
+ @AttributeOverride(name = "address.name", column = @Column(name = "ADDRESS_NAME"))
+ })
+ private Brand brand;
+ @ElementCollection
+ @AttributeOverrides({
+ @AttributeOverride(name = "key.name", column = @Column(name = "OWNER_NAME")),
+ @AttributeOverride(name = "key.surname", column = @Column(name = "OWNER_SURNAME")),
+ @AttributeOverride(name = "value.name", column = @Column(name = "ADDRESS_NAME")),
+ })
+ Map owners;
+
+ public String getModel() {
+ return model;
+ }
+
+ public void setModel(String model) {
+ this.model = model;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Brand getBrand() {
+ return brand;
+ }
+
+ public void setBrand(Brand brand) {
+ this.brand = brand;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Owner.java b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Owner.java
new file mode 100644
index 0000000000..28ef6c7974
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Owner.java
@@ -0,0 +1,25 @@
+package com.baeldung.attribute.override.entity;
+
+import javax.persistence.Embeddable;
+
+@Embeddable
+public class Owner {
+ private String name;
+ private String surname;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getSurname() {
+ return surname;
+ }
+
+ public void setSurname(String surname) {
+ this.surname = surname;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Vehicle.java b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Vehicle.java
new file mode 100644
index 0000000000..2d4c0c04b3
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/entity/Vehicle.java
@@ -0,0 +1,38 @@
+package com.baeldung.attribute.override.entity;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+import javax.persistence.MappedSuperclass;
+
+@MappedSuperclass
+public class Vehicle {
+ @Id
+ @GeneratedValue
+ private Integer id;
+ private String identifier;
+ private Integer numberOfWheels;
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public String getIdentifier() {
+ return identifier;
+ }
+
+ public void setIdentifier(String identifier) {
+ this.identifier = identifier;
+ }
+
+ public Integer getNumberOfWheels() {
+ return numberOfWheels;
+ }
+
+ public void setNumberOfWheels(Integer numberOfWheels) {
+ this.numberOfWheels = numberOfWheels;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/repository/CarRepository.java b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/repository/CarRepository.java
new file mode 100644
index 0000000000..17cea77d89
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/main/java/com/baeldung/attribute/override/repository/CarRepository.java
@@ -0,0 +1,7 @@
+package com.baeldung.attribute.override.repository;
+
+import com.baeldung.attribute.override.entity.Car;
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface CarRepository extends JpaRepository {
+}
diff --git a/persistence-modules/spring-data-jpa-annotations/src/test/java/com/baeldung/attribute/override/AttributeOverrideIntegrationTest.java b/persistence-modules/spring-data-jpa-annotations/src/test/java/com/baeldung/attribute/override/AttributeOverrideIntegrationTest.java
new file mode 100644
index 0000000000..4cc599c7de
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-annotations/src/test/java/com/baeldung/attribute/override/AttributeOverrideIntegrationTest.java
@@ -0,0 +1,56 @@
+package com.baeldung.attribute.override;
+
+import com.baeldung.Application;
+import com.baeldung.attribute.override.entity.Address;
+import com.baeldung.attribute.override.entity.Brand;
+import com.baeldung.attribute.override.entity.Car;
+import com.baeldung.attribute.override.repository.CarRepository;
+import org.assertj.core.api.Assertions;
+import org.jetbrains.annotations.NotNull;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.time.LocalDate;
+
+@RunWith(SpringRunner.class)
+@SpringBootTest(classes = { Application.class })
+public class AttributeOverrideIntegrationTest {
+
+ private static final LocalDate FORD_FOUNDATION_DATE = LocalDate.parse("1903-06-16");
+ @Autowired
+ CarRepository carRepository;
+
+ @Test
+ @Transactional
+ public void whenInsertingCar_thenEmbeddedAndMappedFieldsArePopulated() {
+
+ Car fordMustang = createMustang();
+
+ carRepository.save(fordMustang);
+ Car actualCar = carRepository.getOne(fordMustang.getId());
+
+ Assertions.assertThat(actualCar).isEqualTo(fordMustang);
+ }
+
+ @NotNull
+ private Car createMustang() {
+ Address address = new Address();
+ address.setName("Ford United States");
+ address.setCity("Dearborn");
+
+ Brand ford = new Brand();
+ ford.setName("Ford");
+ ford.setFoundationDate(FORD_FOUNDATION_DATE);
+
+ Car fordMustang = new Car();
+ fordMustang.setIdentifier("WP1AB29P88LA47599");
+ fordMustang.setModel("Ford");
+ fordMustang.setName("My car");
+ fordMustang.setBrand(ford);
+ return fordMustang;
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-crud/pom.xml b/persistence-modules/spring-data-jpa-crud/pom.xml
index 16ee74aa62..8f9a3cc0e8 100644
--- a/persistence-modules/spring-data-jpa-crud/pom.xml
+++ b/persistence-modules/spring-data-jpa-crud/pom.xml
@@ -1,7 +1,7 @@
4.0.0
spring-data-jpa-crud
@@ -47,7 +47,6 @@
h2
runtime
-
org.testcontainers
@@ -64,4 +63,4 @@
1.12.2
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/Product.java b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/Product.java
new file mode 100644
index 0000000000..ef06f77c45
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/Product.java
@@ -0,0 +1,68 @@
+package com.baeldung.softdelete;
+
+
+import java.io.Serializable;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.Table;
+
+import org.hibernate.annotations.Filter;
+import org.hibernate.annotations.FilterDef;
+import org.hibernate.annotations.ParamDef;
+import org.hibernate.annotations.SQLDelete;
+
+@Entity
+@Table(name = "tbl_products")
+@SQLDelete(sql = "UPDATE tbl_products SET deleted = true WHERE id=?")
+@FilterDef(name = "deletedProductFilter", parameters = @ParamDef(name = "isDeleted", type = "boolean"))
+@Filter(name = "deletedProductFilter", condition = "deleted = :isDeleted")
+public class Product implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ @Id
+ @GeneratedValue(strategy = GenerationType.IDENTITY)
+ private Long id;
+
+ private String name;
+
+ private double price;
+
+ private boolean deleted = Boolean.FALSE;
+
+ public Long getId() {
+ return id;
+ }
+
+ public void setId(Long id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice(double price) {
+ this.price = price;
+ }
+
+ public boolean isDeleted() {
+ return deleted;
+ }
+
+ public void setDeleted(boolean deleted) {
+ this.deleted = deleted;
+ }
+
+}
diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductController.java b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductController.java
new file mode 100644
index 0000000000..ebfdfbb2e7
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductController.java
@@ -0,0 +1,34 @@
+package com.baeldung.softdelete;
+
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping("/api/products")
+public class ProductController {
+
+ @Autowired
+ private ProductService productService;
+
+ @PostMapping
+ public Product createOne(@RequestBody Product product) {
+ return productService.create(product);
+ }
+
+ @DeleteMapping("/{id}")
+ public void removeOne(@PathVariable("id") Long id) {
+ productService.remove(id);
+ }
+
+ @GetMapping
+ public Iterable findAll(@RequestParam(value = "isDeleted", required = false, defaultValue = "false") boolean isDeleted) {
+ return productService.findAll(isDeleted);
+ }
+}
diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductRepository.java b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductRepository.java
new file mode 100644
index 0000000000..a305a142aa
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductRepository.java
@@ -0,0 +1,7 @@
+package com.baeldung.softdelete;
+
+import org.springframework.data.repository.CrudRepository;
+
+public interface ProductRepository extends CrudRepository{
+
+}
diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductService.java b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductService.java
new file mode 100644
index 0000000000..82d02fa87c
--- /dev/null
+++ b/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/softdelete/ProductService.java
@@ -0,0 +1,35 @@
+package com.baeldung.softdelete;
+
+import javax.persistence.EntityManager;
+
+import org.hibernate.Filter;
+import org.hibernate.Session;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+@Service
+public class ProductService {
+
+ @Autowired
+ private ProductRepository productRepository;
+
+ @Autowired
+ private EntityManager entityManager;
+
+ public Product create(Product product) {
+ return productRepository.save(product);
+ }
+
+ public void remove(Long id){
+ productRepository.deleteById(id);
+ }
+
+ public Iterable findAll(boolean isDeleted){
+ Session session = entityManager.unwrap(Session.class);
+ Filter filter = session.enableFilter("deletedProductFilter");
+ filter.setParameter("isDeleted", isDeleted);
+ Iterable products = productRepository.findAll();
+ session.disableFilter("deletedProductFilter");
+ return products;
+ }
+}
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-crud/src/main/resources/application.properties b/persistence-modules/spring-data-jpa-crud/src/main/resources/application.properties
index af0df308cd..18ef8d4e60 100644
--- a/persistence-modules/spring-data-jpa-crud/src/main/resources/application.properties
+++ b/persistence-modules/spring-data-jpa-crud/src/main/resources/application.properties
@@ -5,10 +5,5 @@ spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.generate_statistics=true
-# JPA-Schema-Generation
-# Use below configuration to generate database schema create commands based on the entity models
-# and export them into the create.sql file
-#spring.jpa.properties.javax.persistence.schema-generation.scripts.action=create
-#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-target=create.sql
-#spring.jpa.properties.javax.persistence.schema-generation.scripts.create-source=metadata
-#spring.jpa.properties.hibernate.format_sql=true
\ No newline at end of file
+spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
+
diff --git a/persistence-modules/spring-data-jpa-enterprise/pom.xml b/persistence-modules/spring-data-jpa-enterprise/pom.xml
index 12ffeee7f0..4367a11222 100644
--- a/persistence-modules/spring-data-jpa-enterprise/pom.xml
+++ b/persistence-modules/spring-data-jpa-enterprise/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-jpa-enterprise
@@ -12,58 +13,49 @@
0.0.1-SNAPSHOT
../../parent-boot-2
-
+
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-data-jdbc
-
org.springframework.boot
spring-boot-starter-cache
-
com.h2database
h2
-
-
+
org.hibernate
hibernate-envers
-
com.google.guava
guava
${guava.version}
-
org.mapstruct
mapstruct-jdk8
${mapstruct.version}
provided
-
org.springframework.security
spring-security-test
test
-
-
+
org.testcontainers
postgresql
@@ -100,4 +92,4 @@
1.12.2
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-filtering/pom.xml b/persistence-modules/spring-data-jpa-filtering/pom.xml
index 25ef68fe4c..038fd24723 100644
--- a/persistence-modules/spring-data-jpa-filtering/pom.xml
+++ b/persistence-modules/spring-data-jpa-filtering/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-data-jpa-filtering
@@ -25,12 +26,10 @@
org.hibernate
hibernate-envers
-
com.h2database
h2
-
org.testcontainers
@@ -38,13 +37,11 @@
${testcontainers.postgresql.version}
test
-
org.postgresql
postgresql
-
org.springframework.security
spring-security-test
@@ -59,7 +56,6 @@
spring-boot-starter-test
test
-
com.google.guava
guava
@@ -72,7 +68,6 @@
1.10.6
42.2.5
21.0
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-query-2/pom.xml b/persistence-modules/spring-data-jpa-query-2/pom.xml
index 282a1ff83a..96585d9325 100644
--- a/persistence-modules/spring-data-jpa-query-2/pom.xml
+++ b/persistence-modules/spring-data-jpa-query-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-data-jpa-query-2
spring-data-jpa-query-2
@@ -22,17 +22,14 @@
org.springframework.security
spring-security-core
-
com.h2database
h2
-
com.fasterxml.jackson.core
jackson-databind
-
org.hibernate
hibernate-envers
@@ -90,4 +87,5 @@
5.2.10.Final
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-query/pom.xml b/persistence-modules/spring-data-jpa-query/pom.xml
index 1576fd729d..c231afdd17 100644
--- a/persistence-modules/spring-data-jpa-query/pom.xml
+++ b/persistence-modules/spring-data-jpa-query/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-data-jpa-query
spring-data-jpa-query
@@ -18,23 +18,19 @@
org.springframework.boot
spring-boot-starter-data-jpa
-
com.h2database
h2
-
net.ttddyy
datasource-proxy
${datasource-proxy.version}
-
com.fasterxml.jackson.core
jackson-databind
-
org.springframework
spring-oxm
@@ -43,7 +39,6 @@
1.4.1
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-repo-2/pom.xml b/persistence-modules/spring-data-jpa-repo-2/pom.xml
index 3be1068d8c..b382e35e28 100644
--- a/persistence-modules/spring-data-jpa-repo-2/pom.xml
+++ b/persistence-modules/spring-data-jpa-repo-2/pom.xml
@@ -1,8 +1,10 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-data-jpa-repo-2
+ spring-data-jpa-repo-2
com.baeldung
@@ -11,9 +13,6 @@
../../parent-boot-2
- spring-data-jpa-repo-2
- spring-data-jpa-repo-2
-
@@ -32,7 +31,6 @@
com.h2database
h2
-
com.google.guava
@@ -43,6 +41,5 @@
29.0-jre
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-repo/pom.xml b/persistence-modules/spring-data-jpa-repo/pom.xml
index 16a214fd7f..26fff365a1 100644
--- a/persistence-modules/spring-data-jpa-repo/pom.xml
+++ b/persistence-modules/spring-data-jpa-repo/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-jpa-repo
spring-data-jpa-repo
@@ -17,39 +18,30 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-data-jdbc
-
mysql
mysql-connector-java
-
org.postgresql
postgresql
-
com.h2database
h2
-
org.springframework
spring-oxm
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-keyvalue/pom.xml b/persistence-modules/spring-data-keyvalue/pom.xml
index 3aaee2f00c..aa2696dd12 100644
--- a/persistence-modules/spring-data-keyvalue/pom.xml
+++ b/persistence-modules/spring-data-keyvalue/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
spring-data-keyvalue
spring-data-keyvalue
@@ -16,19 +17,13 @@
org.springframework.boot
spring-boot-starter
-
org.springframework.data
spring-data-keyvalue
-
org.springframework.boot
spring-boot-starter-test
-
-
-
-
\ No newline at end of file
diff --git a/persistence-modules/spring-data-mongodb/pom.xml b/persistence-modules/spring-data-mongodb/pom.xml
index 448b635667..ef5a0f0550 100644
--- a/persistence-modules/spring-data-mongodb/pom.xml
+++ b/persistence-modules/spring-data-mongodb/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-data-mongodb
@@ -18,32 +19,27 @@
spring-data-mongodb
${org.springframework.data.version}
-
org.mongodb
mongodb-driver-sync
${mongodb-driver.version}
-
org.mongodb
mongodb-driver-reactivestreams
${mongodb-reactivestreams.version}
-
io.projectreactor
reactor-core
${projectreactor.version}
-
io.projectreactor
reactor-test
${projectreactor.version}
test
-
org.springframework
spring-core
@@ -107,7 +103,6 @@
4.1.0
3.2.0.RELEASE
4.0.5
-
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-neo4j/pom.xml b/persistence-modules/spring-data-neo4j/pom.xml
index d827c32a3c..8c5030779b 100644
--- a/persistence-modules/spring-data-neo4j/pom.xml
+++ b/persistence-modules/spring-data-neo4j/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-neo4j
1.0
@@ -97,4 +98,4 @@
3.1.2
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-redis/pom.xml b/persistence-modules/spring-data-redis/pom.xml
index d271df31c7..5e17f27c06 100644
--- a/persistence-modules/spring-data-redis/pom.xml
+++ b/persistence-modules/spring-data-redis/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-data-redis
@@ -32,7 +33,6 @@
reactor-test
test
-
org.springframework
spring-test
@@ -42,7 +42,6 @@
spring-boot-starter-test
test
-
org.junit.jupiter
junit-jupiter-api
@@ -52,25 +51,21 @@
junit-platform-runner
test
-
cglib
cglib-nodep
${cglib.version}
-
redis.clients
jedis
jar
-
com.lordofthejars
nosqlunit-redis
${nosqlunit.version}
-
com.github.kstyrc
embedded-redis
@@ -100,4 +95,4 @@
0.6
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-solr/pom.xml b/persistence-modules/spring-data-solr/pom.xml
index 38b5bf8238..d7523e6de2 100644
--- a/persistence-modules/spring-data-solr/pom.xml
+++ b/persistence-modules/spring-data-solr/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-data-solr
@@ -45,7 +46,6 @@
2.0.5.RELEASE
-
\ No newline at end of file
diff --git a/persistence-modules/spring-hibernate-3/pom.xml b/persistence-modules/spring-hibernate-3/pom.xml
index b28895f86d..9b143597c7 100644
--- a/persistence-modules/spring-hibernate-3/pom.xml
+++ b/persistence-modules/spring-hibernate-3/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-hibernate-3
@@ -84,4 +85,4 @@
19.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-hibernate-5/pom.xml b/persistence-modules/spring-hibernate-5/pom.xml
index 8a8b6c15e3..caa1598af4 100644
--- a/persistence-modules/spring-hibernate-5/pom.xml
+++ b/persistence-modules/spring-hibernate-5/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-hibernate-5
0.1-SNAPSHOT
@@ -13,9 +14,7 @@
-
-
org.springframework
spring-context
@@ -32,9 +31,7 @@
spring-aspects
${org.springframework.version}
-
-
org.springframework
spring-orm
@@ -65,32 +62,25 @@
hibernate-search-orm
${hibernatesearch.version}
-
org.apache.tomcat
tomcat-dbcp
${tomcat-dbcp.version}
-
-
-
com.google.guava
guava
${guava.version}
-
-
org.apache.commons
commons-lang3
${commons-lang3.version}
test
-
org.springframework
spring-test
@@ -103,25 +93,21 @@
${org.springframework.security.version}
test
-
org.hsqldb
hsqldb
${hsqldb.version}
-
mysql
mysql-connector-java
${mysql-connector-java.version}
-
com.h2database
h2
${h2.version}
-
@@ -129,7 +115,6 @@
5.0.2.RELEASE
1.10.6.RELEASE
4.2.1.RELEASE
-
5.2.10.Final
5.8.2.Final
@@ -137,9 +122,8 @@
9.0.0.M26
1.1
2.3.4
-
21.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-jdbc/pom.xml b/persistence-modules/spring-jdbc/pom.xml
index 8a5786e1a5..28a858dd43 100644
--- a/persistence-modules/spring-jdbc/pom.xml
+++ b/persistence-modules/spring-jdbc/pom.xml
@@ -1,8 +1,10 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-jdbc
+ spring-jdbc
com.baeldung
@@ -11,9 +13,6 @@
../../parent-boot-2
- spring-jdbc
- spring-jdbc
-
org.springframework.data
@@ -34,6 +33,4 @@
-
-
\ No newline at end of file
diff --git a/persistence-modules/spring-jooq/pom.xml b/persistence-modules/spring-jooq/pom.xml
index 6b3d565175..4c195a6c92 100644
--- a/persistence-modules/spring-jooq/pom.xml
+++ b/persistence-modules/spring-jooq/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-jooq
spring-jooq
@@ -32,14 +33,12 @@
jooq
${org.jooq.version}
-
com.h2database
h2
${h2.version}
-
org.springframework
@@ -63,7 +62,6 @@
org.springframework.boot
spring-boot-starter-test
-
org.springframework
@@ -74,7 +72,6 @@
-
org.apache.maven.plugins
@@ -84,7 +81,6 @@
0
-
org.codehaus.mojo
properties-maven-plugin
@@ -103,7 +99,6 @@
-
org.codehaus.mojo
sql-maven-plugin
@@ -133,7 +128,6 @@
-
org.jooq
jooq-codegen-maven
@@ -164,11 +158,11 @@
-
-
+
org.eclipse.m2e
lifecycle-mapping
diff --git a/persistence-modules/spring-jpa-2/pom.xml b/persistence-modules/spring-jpa-2/pom.xml
index 52067f3e5e..16168036be 100644
--- a/persistence-modules/spring-jpa-2/pom.xml
+++ b/persistence-modules/spring-jpa-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-jpa-2
0.1-SNAPSHOT
@@ -25,7 +26,6 @@
spring-boot-starter-data-jpa
${spring-boot.version}
-
org.springframework
spring-orm
@@ -42,7 +42,6 @@
spring-context
${org.springframework.version}
-
org.hibernate
@@ -59,14 +58,12 @@
tomcat-dbcp
${tomcat-dbcp.version}
-
com.google.guava
guava
${guava.version}
-
org.springframework.boot
@@ -79,17 +76,14 @@
${org.springframework.version}
test
-
5.1.5.RELEASE
2.2.6.RELEASE
-
9.0.0.M26
-
21.0
diff --git a/persistence-modules/spring-jpa/pom.xml b/persistence-modules/spring-jpa/pom.xml
index e389886d8d..1dca2baa98 100644
--- a/persistence-modules/spring-jpa/pom.xml
+++ b/persistence-modules/spring-jpa/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-jpa
0.1-SNAPSHOT
@@ -36,9 +37,7 @@
spring-webmvc
${org.springframework.version}
-
-
org.hibernate
hibernate-core
@@ -70,9 +69,7 @@
h2
${h2.version}
-
-
org.hibernate
hibernate-validator
@@ -83,7 +80,6 @@
javax.el-api
${javax.el-api.version}
-
javax.servlet
@@ -96,9 +92,7 @@
provided
${javax.servlet.servlet-api.version}
-
-
com.google.guava
guava
@@ -109,41 +103,33 @@
assertj-core
${assertj.version}
-
-
org.apache.commons
commons-lang3
${commons-lang3.version}
test
-
org.springframework
spring-test
${org.springframework.version}
test
-
5.1.5.RELEASE
3.21.0-GA
-
6.0.6
2.1.5.RELEASE
-
2.5
-
6.0.15.Final
1.4.01
2.2.5
-
21.0
3.8.0
diff --git a/persistence-modules/spring-mybatis/pom.xml b/persistence-modules/spring-mybatis/pom.xml
index 40d4d915ab..9247d59fe4 100644
--- a/persistence-modules/spring-mybatis/pom.xml
+++ b/persistence-modules/spring-mybatis/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-mybatis
0.1-SNAPSHOT
@@ -14,76 +15,61 @@
-
-
org.springframework
spring-context
${org.springframework.version}
-
org.springframework
spring-beans
${org.springframework.version}
-
-
org.mybatis.spring.boot
mybatis-spring-boot-starter
${mybatis-spring-boot-starter.version}
-
-
com.h2database
h2
${h2.version}
-
org.springframework
spring-jdbc
${org.springframework.version}
-
org.mybatis
mybatis
${mybatis.version}
-
org.mybatis
mybatis-spring
${spring-mybatis.version}
-
-
org.springframework.boot
spring-boot-starter-test
-
org.springframework
spring-test
${org.springframework.version}
test
-
org.assertj
assertj-core
${assertj-core.version}
test
-
@@ -99,15 +85,13 @@
5.1.8.RELEASE
-
2.0.2
3.5.2
2.1.0
1.4.197
-
3.8.0
-
+
\ No newline at end of file
diff --git a/persistence-modules/spring-persistence-simple/pom.xml b/persistence-modules/spring-persistence-simple/pom.xml
index 13898d01e7..437a439b99 100644
--- a/persistence-modules/spring-persistence-simple/pom.xml
+++ b/persistence-modules/spring-persistence-simple/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-persistence-simple
0.1-SNAPSHOT
@@ -24,7 +25,6 @@
spring-context
${org.springframework.version}
-
javax.persistence
@@ -57,14 +57,12 @@
${h2.version}
test
-
com.github.h-thurow
simple-jndi
${simple-jndi.version}
-
org.springframework
@@ -100,4 +98,5 @@
3.3.3
+
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ab3c73ff8a..d8bf527184 100644
--- a/pom.xml
+++ b/pom.xml
@@ -623,6 +623,7 @@
spring-boot-rest-2
spring-caching
+ spring-caching-2
spring-cloud
spring-cloud-bus
@@ -1079,6 +1080,7 @@
spring-boot-rest-2
spring-caching
+ spring-caching-2
spring-cloud
spring-cloud-bus
@@ -1274,6 +1276,7 @@
+ spring-boot-modules/spring-boot-cassandre
core-java-modules/core-java-9
core-java-modules/core-java-9-improvements
core-java-modules/core-java-9-jigsaw
diff --git a/protobuffer/pom.xml b/protobuffer/pom.xml
index e57495e93c..cf8dbe417e 100644
--- a/protobuffer/pom.xml
+++ b/protobuffer/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
protobuffer
protobuffer
diff --git a/quarkus-extension/pom.xml b/quarkus-extension/pom.xml
index 394376e59e..c2ae66a3a0 100644
--- a/quarkus-extension/pom.xml
+++ b/quarkus-extension/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.quarkus.extension
quarkus-extension
@@ -14,10 +14,10 @@
parent-modules
1.0.0-SNAPSHOT
-
+
quarkus-liquibase
quarkus-app
-
+
\ No newline at end of file
diff --git a/quarkus-extension/quarkus-app/pom.xml b/quarkus-extension/quarkus-app/pom.xml
index 4c9e9c3cc7..f609261c5a 100644
--- a/quarkus-extension/quarkus-app/pom.xml
+++ b/quarkus-extension/quarkus-app/pom.xml
@@ -1,7 +1,7 @@
-
+
4.0.0
com.baeldung.quarkus.app
quarkus-app
@@ -30,7 +30,6 @@
runtime
${project.version}
-
io.quarkus
quarkus-jdbc-h2
@@ -58,4 +57,4 @@
1.0.0.Final
-
+
\ No newline at end of file
diff --git a/quarkus-extension/quarkus-liquibase/deployment/pom.xml b/quarkus-extension/quarkus-liquibase/deployment/pom.xml
index 42d3ca2810..9a9e4485cd 100644
--- a/quarkus-extension/quarkus-liquibase/deployment/pom.xml
+++ b/quarkus-extension/quarkus-liquibase/deployment/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.quarkus.liquibase
deployment
@@ -59,4 +59,4 @@
3.8.1
-
+
\ No newline at end of file
diff --git a/quarkus-extension/quarkus-liquibase/pom.xml b/quarkus-extension/quarkus-liquibase/pom.xml
index fdede2000e..1a86aeb75c 100644
--- a/quarkus-extension/quarkus-liquibase/pom.xml
+++ b/quarkus-extension/quarkus-liquibase/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.quarkus.liquibase
quarkus-liquibase
@@ -13,7 +13,7 @@
quarkus-extension
1.0-SNAPSHOT
-
+
runtime
deployment
@@ -23,4 +23,4 @@
1.0.0.Final
-
+
\ No newline at end of file
diff --git a/quarkus-extension/quarkus-liquibase/runtime/pom.xml b/quarkus-extension/quarkus-liquibase/runtime/pom.xml
index 0250d34711..6656556c4b 100644
--- a/quarkus-extension/quarkus-liquibase/runtime/pom.xml
+++ b/quarkus-extension/quarkus-liquibase/runtime/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
com.baeldung.quarkus.liquibase
@@ -71,4 +72,4 @@
3.8.1
-
+
\ No newline at end of file
diff --git a/quarkus/pom.xml b/quarkus/pom.xml
index 9826fd1034..6e250a2858 100644
--- a/quarkus/pom.xml
+++ b/quarkus/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.quarkus
quarkus
@@ -159,4 +160,4 @@
5.6.0
-
+
\ No newline at end of file
diff --git a/rabbitmq/pom.xml b/rabbitmq/pom.xml
index 33ccf5402f..8a707a15dd 100644
--- a/rabbitmq/pom.xml
+++ b/rabbitmq/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rabbitmq
0.1-SNAPSHOT
diff --git a/ratpack/pom.xml b/ratpack/pom.xml
index 9ad654fa7d..c57934d8b7 100644
--- a/ratpack/pom.xml
+++ b/ratpack/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
ratpack
1.0-SNAPSHOT
@@ -93,4 +94,4 @@
1.6.1
-
+
\ No newline at end of file
diff --git a/reactive-systems/inventory-service/pom.xml b/reactive-systems/inventory-service/pom.xml
index b5ec210636..86575d498c 100644
--- a/reactive-systems/inventory-service/pom.xml
+++ b/reactive-systems/inventory-service/pom.xml
@@ -28,7 +28,6 @@
org.springframework.kafka
spring-kafka
-
org.projectlombok
lombok
@@ -65,4 +64,5 @@
+
\ No newline at end of file
diff --git a/reactive-systems/order-service/pom.xml b/reactive-systems/order-service/pom.xml
index 603f0373ba..e6453732b4 100644
--- a/reactive-systems/order-service/pom.xml
+++ b/reactive-systems/order-service/pom.xml
@@ -28,7 +28,6 @@
org.springframework.kafka
spring-kafka
-
org.projectlombok
lombok
@@ -66,4 +65,4 @@
-
+
\ No newline at end of file
diff --git a/reactive-systems/pom.xml b/reactive-systems/pom.xml
index bce2575d9e..81462090b8 100644
--- a/reactive-systems/pom.xml
+++ b/reactive-systems/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
reactive-systems
0.0.1-SNAPSHOT
@@ -19,4 +20,4 @@
order-service
-
+
\ No newline at end of file
diff --git a/reactive-systems/shipping-service/pom.xml b/reactive-systems/shipping-service/pom.xml
index 458b91b6ce..f725ca72d1 100644
--- a/reactive-systems/shipping-service/pom.xml
+++ b/reactive-systems/shipping-service/pom.xml
@@ -24,12 +24,10 @@
org.springframework.kafka
spring-kafka
-
com.fasterxml.jackson.core
jackson-databind
-
org.projectlombok
lombok
@@ -67,4 +65,4 @@
-
+
\ No newline at end of file
diff --git a/reactor-core/README.md b/reactor-core/README.md
index 0214aa26fd..08dac354ab 100644
--- a/reactor-core/README.md
+++ b/reactor-core/README.md
@@ -8,3 +8,4 @@ This module contains articles about Reactor Core.
- [Combining Publishers in Project Reactor](https://www.baeldung.com/reactor-combine-streams)
- [Programmatically Creating Sequences with Project Reactor](https://www.baeldung.com/flux-sequences-reactor)
- [How to Extract a Mono’s Content in Java](https://www.baeldung.com/java-string-from-mono)
+- [How to Convert Mono> Into Flux](https://www.baeldung.com/java-mono-list-to-flux)
diff --git a/reactor-core/pom.xml b/reactor-core/pom.xml
index 317cbde6e2..6eead97bc2 100644
--- a/reactor-core/pom.xml
+++ b/reactor-core/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
org.baeldung
reactor-core
@@ -38,4 +39,4 @@
3.6.1
-
+
\ No newline at end of file
diff --git a/reactor-core/src/test/java/com/baeldung/mono/MonoUnitTest.java b/reactor-core/src/test/java/com/baeldung/mono/MonoUnitTest.java
index f9e67b0a2f..0c6e0c07ef 100644
--- a/reactor-core/src/test/java/com/baeldung/mono/MonoUnitTest.java
+++ b/reactor-core/src/test/java/com/baeldung/mono/MonoUnitTest.java
@@ -1,10 +1,14 @@
package com.baeldung.mono;
import org.junit.Test;
+import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
+import reactor.test.StepVerifier;
import java.time.Duration;
import java.time.temporal.ChronoUnit;
+import java.util.ArrayList;
+import java.util.List;
import java.util.Optional;
import static org.junit.Assert.assertEquals;
@@ -40,4 +44,40 @@ public class MonoUnitTest {
// blocking
return Mono.just("Hello world!");
}
+
+ @Test
+ public void whenMonoProducesListOfElements_thenConvertToFluxofElements() {
+
+ Mono> monoList = monoOfList();
+
+ StepVerifier.create(monoTofluxUsingFlatMapIterable(monoList))
+ .expectNext("one", "two", "three", "four")
+ .verifyComplete();
+
+ StepVerifier.create(monoTofluxUsingFlatMapMany(monoList))
+ .expectNext("one", "two", "three", "four")
+ .verifyComplete();
+ }
+
+ private Flux monoTofluxUsingFlatMapIterable(Mono> monoList) {
+ return monoList
+ .flatMapIterable(list -> list)
+ .log();
+ }
+
+ private Flux monoTofluxUsingFlatMapMany(Mono> monoList) {
+ return monoList
+ .flatMapMany(Flux::fromIterable)
+ .log();
+ }
+
+ private Mono> monoOfList() {
+ List list = new ArrayList<>();
+ list.add("one");
+ list.add("two");
+ list.add("three");
+ list.add("four");
+
+ return Mono.just(list);
+ }
}
diff --git a/resteasy/pom.xml b/resteasy/pom.xml
index ffb6adb3df..d35fc852ba 100644
--- a/resteasy/pom.xml
+++ b/resteasy/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
resteasy
1.0
@@ -26,27 +27,22 @@
-
org.jboss.resteasy
resteasy-client
${resteasy.version}
-
-
org.jboss.resteasy
resteasy-jaxb-provider
${resteasy.version}
-
org.jboss.resteasy
resteasy-jackson-provider
${resteasy.version}
-
commons-io
commons-io
diff --git a/rsocket/pom.xml b/rsocket/pom.xml
index 5b407c2bd0..57c927253f 100644
--- a/rsocket/pom.xml
+++ b/rsocket/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rsocket
0.0.1-SNAPSHOT
@@ -30,4 +31,4 @@
0.11.13
-
+
\ No newline at end of file
diff --git a/rule-engines/easy-rules/pom.xml b/rule-engines/easy-rules/pom.xml
index b9661cd1c3..a8159f2813 100644
--- a/rule-engines/easy-rules/pom.xml
+++ b/rule-engines/easy-rules/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.easyrules
easy-rules
@@ -25,4 +26,4 @@
3.0.0
-
+
\ No newline at end of file
diff --git a/rule-engines/jess/pom.xml b/rule-engines/jess/pom.xml
index 40d50fae70..f5db0374ef 100644
--- a/rule-engines/jess/pom.xml
+++ b/rule-engines/jess/pom.xml
@@ -1,9 +1,8 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
-
com.baeldung.rules.jess
jess
1.0-SNAPSHOT
diff --git a/rule-engines/openl-tablets/pom.xml b/rule-engines/openl-tablets/pom.xml
index 25c4b8365a..03b286e409 100644
--- a/rule-engines/openl-tablets/pom.xml
+++ b/rule-engines/openl-tablets/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.openltablets
openl-tablets
@@ -30,4 +31,4 @@
5.19.4
-
+
\ No newline at end of file
diff --git a/rule-engines/pom.xml b/rule-engines/pom.xml
index 27748a5c3e..db6b2e47ef 100644
--- a/rule-engines/pom.xml
+++ b/rule-engines/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rule-engines
rule-engines
@@ -19,4 +20,4 @@
-
+
\ No newline at end of file
diff --git a/rule-engines/rulebook/pom.xml b/rule-engines/rulebook/pom.xml
index 95ededa5f9..55b77c50df 100644
--- a/rule-engines/rulebook/pom.xml
+++ b/rule-engines/rulebook/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.rulebook
rulebook
@@ -25,4 +26,4 @@
0.6.2
-
+
\ No newline at end of file
diff --git a/rxjava-core/pom.xml b/rxjava-core/pom.xml
index daec1f783f..cd6075e127 100644
--- a/rxjava-core/pom.xml
+++ b/rxjava-core/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rxjava-core
1.0-SNAPSHOT
diff --git a/rxjava-libraries/pom.xml b/rxjava-libraries/pom.xml
index 45c1907a58..5d2c9ec3bb 100644
--- a/rxjava-libraries/pom.xml
+++ b/rxjava-libraries/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rxjava-libraries
1.0-SNAPSHOT
diff --git a/rxjava-observables/pom.xml b/rxjava-observables/pom.xml
index 3cedfc4afc..feb4fc1f39 100644
--- a/rxjava-observables/pom.xml
+++ b/rxjava-observables/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rxjava-observables
1.0-SNAPSHOT
diff --git a/rxjava-operators/pom.xml b/rxjava-operators/pom.xml
index 8064613f45..ba85dc428b 100644
--- a/rxjava-operators/pom.xml
+++ b/rxjava-operators/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rxjava-operators
1.0-SNAPSHOT
diff --git a/saas/pom.xml b/saas/pom.xml
index 93965b37c4..87f273939c 100644
--- a/saas/pom.xml
+++ b/saas/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
saas
0.1.0-SNAPSHOT
@@ -35,7 +36,6 @@
true
-
org.codehaus.mojo
@@ -47,7 +47,7 @@
-Xmx300m
-XX:+UseParallelGC
-classpath
-
+
com.baeldung.outofmemoryerror.OutOfMemoryGCLimitExceed
diff --git a/slack/pom.xml b/slack/pom.xml
index 51a4cf029f..690bf5132c 100644
--- a/slack/pom.xml
+++ b/slack/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.examples
slack
@@ -57,4 +58,4 @@
2.4
-
+
\ No newline at end of file
diff --git a/software-security/sql-injection-samples/pom.xml b/software-security/sql-injection-samples/pom.xml
index 6cacaa4ad0..7953e43ebe 100644
--- a/software-security/sql-injection-samples/pom.xml
+++ b/software-security/sql-injection-samples/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
sql-injection-samples
0.0.1-SNAPSHOT
diff --git a/spark-java/pom.xml b/spark-java/pom.xml
index 686cf75058..b5538b4ec3 100644
--- a/spark-java/pom.xml
+++ b/spark-java/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spark-java
0.1.0-SNAPSHOT
@@ -32,4 +33,4 @@
2.8.0
-
+
\ No newline at end of file
diff --git a/spf4j/pom.xml b/spf4j/pom.xml
index b0568e9f7a..6d325947cf 100644
--- a/spf4j/pom.xml
+++ b/spf4j/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spf4j
spf4j
@@ -18,4 +19,4 @@
spf4j-aspects-app
-
+
\ No newline at end of file
diff --git a/spf4j/spf4j-aspects-app/pom.xml b/spf4j/spf4j-aspects-app/pom.xml
index 24a419233e..4a4c7cb804 100644
--- a/spf4j/spf4j-aspects-app/pom.xml
+++ b/spf4j/spf4j-aspects-app/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spf4j-aspects-app
0.0.1-SNAPSHOT
@@ -87,4 +87,4 @@
3.1.1
-
+
\ No newline at end of file
diff --git a/spf4j/spf4j-core-app/pom.xml b/spf4j/spf4j-core-app/pom.xml
index 280a59e0d9..2961174a35 100644
--- a/spf4j/spf4j-core-app/pom.xml
+++ b/spf4j/spf4j-core-app/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spf4j-core-app
0.0.1-SNAPSHOT
@@ -87,4 +87,4 @@
3.1.1
-
+
\ No newline at end of file
diff --git a/spring-4/pom.xml b/spring-4/pom.xml
index cd6b232317..21de925d99 100644
--- a/spring-4/pom.xml
+++ b/spring-4/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-4
spring-4
@@ -8,7 +9,7 @@
jar
-
+
com.baeldung
parent-boot-1
0.0.1-SNAPSHOT
@@ -83,7 +84,6 @@
${easymock.version}
test
-
org.hsqldb
hsqldb
@@ -115,4 +115,4 @@
2.4.0
-
+
\ No newline at end of file
diff --git a/spring-5-data-reactive/pom.xml b/spring-5-data-reactive/pom.xml
index 0fb689f16d..5f12636280 100644
--- a/spring-5-data-reactive/pom.xml
+++ b/spring-5-data-reactive/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-5-data-reactive
spring-5-data-reactive
@@ -44,7 +45,6 @@
io.reactivex.rxjava2
rxjava
-
org.springframework
spring-test
@@ -59,18 +59,15 @@
de.flapdoodle.embed.mongo
test
-
org.springframework.boot
spring-boot-starter-webflux
-
org.springframework
spring-tx
${spring-tx.version}
-
org.springframework.data
spring-data-r2dbc
@@ -118,14 +115,12 @@
${java.version}
-
+
default-compile
none
-
+
default-testCompile
none
@@ -160,5 +155,4 @@
2.2.6.RELEASE
-
-
+
\ No newline at end of file
diff --git a/spring-5-reactive-2/pom.xml b/spring-5-reactive-2/pom.xml
index 093be0f03c..0758365932 100644
--- a/spring-5-reactive-2/pom.xml
+++ b/spring-5-reactive-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-5-reactive-2
0.0.1-SNAPSHOT
@@ -33,19 +34,16 @@
reactor-spring
${reactor-spring.version}
-
org.projectlombok
lombok
provided
-
org.springframework.boot
spring-boot-starter-test
test
-
com.github.tomakehurst
wiremock-jre8
@@ -82,4 +80,4 @@
2.24.0
-
+
\ No newline at end of file
diff --git a/spring-5-reactive-client/pom.xml b/spring-5-reactive-client/pom.xml
index 28f692a735..136f31b49e 100644
--- a/spring-5-reactive-client/pom.xml
+++ b/spring-5-reactive-client/pom.xml
@@ -1,6 +1,5 @@
-
4.0.0
@@ -72,7 +71,6 @@
${okhttp.version}
test
-
org.springframework.boot
@@ -84,7 +82,6 @@
h2
runtime
-
org.springframework
spring-test
@@ -100,14 +97,12 @@
2.26.0
test
-
org.apache.commons
commons-collections4
${commons-collections4.version}
test
-
org.projectlombok
lombok
@@ -163,4 +158,4 @@
4.0.1
-
+
\ No newline at end of file
diff --git a/spring-5-reactive-oauth/pom.xml b/spring-5-reactive-oauth/pom.xml
index 15f5dcacaa..8e8b472881 100644
--- a/spring-5-reactive-oauth/pom.xml
+++ b/spring-5-reactive-oauth/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.reactive.oauth
spring-5-reactive-oauth
@@ -25,12 +26,10 @@
org.springframework.boot
spring-boot-starter-webflux
-
org.springframework.security
spring-security-oauth2-client
-
org.springframework.boot
spring-boot-starter-test
@@ -64,4 +63,4 @@
-
+
\ No newline at end of file
diff --git a/spring-5-reactive-security/pom.xml b/spring-5-reactive-security/pom.xml
index 2024cb5138..267a683fa7 100644
--- a/spring-5-reactive-security/pom.xml
+++ b/spring-5-reactive-security/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-5-reactive-security
0.0.1-SNAPSHOT
@@ -60,9 +61,7 @@
org.apache.commons
commons-lang3
-
-
org.springframework.boot
spring-boot-devtools
@@ -77,14 +76,12 @@
spring-boot-starter-test
test
-
org.apache.commons
commons-collections4
${commons-collections4.version}
test
-
io.reactivex.rxjava2
rxjava
@@ -130,4 +127,4 @@
3.1.6.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-5-reactive/pom.xml b/spring-5-reactive/pom.xml
index 40791faaaf..408573198b 100644
--- a/spring-5-reactive/pom.xml
+++ b/spring-5-reactive/pom.xml
@@ -52,9 +52,7 @@
org.apache.commons
commons-lang3
-
-
org.springframework.boot
spring-boot-devtools
@@ -79,8 +77,6 @@
reactor-test
test
-
-
org.springframework.boot
@@ -102,14 +98,12 @@
org.springframework.session
spring-session-data-redis
-
org.apache.commons
commons-collections4
${commons-collections4.version}
test
-
io.reactivex.rxjava2
rxjava
@@ -162,4 +156,4 @@
4.1
-
+
\ No newline at end of file
diff --git a/spring-5-webflux/pom.xml b/spring-5-webflux/pom.xml
index 766521a80f..ad1a66943c 100644
--- a/spring-5-webflux/pom.xml
+++ b/spring-5-webflux/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-5-webflux
1.0-SNAPSHOT
@@ -31,29 +32,24 @@
org.springframework.boot
spring-boot-starter-webflux
-
org.springframework.boot
spring-boot-starter-rsocket
-
org.projectlombok
lombok
-
org.springframework.boot
spring-boot-starter-test
test
-
io.projectreactor
reactor-test
test
-
com.squareup.okhttp3
mockwebserver
@@ -73,4 +69,4 @@
2.3.3.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-5/pom.xml b/spring-5/pom.xml
index 082b1f8a87..5ebeb4dadf 100644
--- a/spring-5/pom.xml
+++ b/spring-5/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-5
0.0.1-SNAPSHOT
@@ -55,9 +55,7 @@
org.apache.commons
commons-lang3
-
-
org.springframework.boot
spring-boot-devtools
@@ -68,7 +66,6 @@
h2
runtime
-
org.springframework
spring-test
@@ -133,7 +130,7 @@
-
+
@@ -144,4 +141,4 @@
${project.build.directory}/generated-snippets
-
+
\ No newline at end of file
diff --git a/spring-activiti/pom.xml b/spring-activiti/pom.xml
index a8557b4f56..c685207cc4 100644
--- a/spring-activiti/pom.xml
+++ b/spring-activiti/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-activiti
spring-activiti
@@ -8,7 +9,8 @@
Demo project for Spring Boot
-
+
com.baeldung
parent-boot-1
0.0.1-SNAPSHOT
@@ -30,7 +32,6 @@
org.springframework.boot
spring-boot-starter-thymeleaf
-
com.h2database
h2
@@ -60,4 +61,4 @@
6.0.0
-
+
\ No newline at end of file
diff --git a/spring-akka/pom.xml b/spring-akka/pom.xml
index 23535a8ccc..fb7a6198c3 100644
--- a/spring-akka/pom.xml
+++ b/spring-akka/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-akka
0.1-SNAPSHOT
diff --git a/spring-amqp/pom.xml b/spring-amqp/pom.xml
index f32db5b8b4..1a0b78c26e 100755
--- a/spring-amqp/pom.xml
+++ b/spring-amqp/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-amqp
1.0.0-SNAPSHOT
@@ -25,4 +26,4 @@
com.baeldung.springamqp.simple.HelloWorldMessageApp
-
+
\ No newline at end of file
diff --git a/spring-aop/pom.xml b/spring-aop/pom.xml
index d18019a5ca..464a830383 100644
--- a/spring-aop/pom.xml
+++ b/spring-aop/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-aop
@@ -22,7 +23,6 @@
org.aspectj
aspectjweaver
-
org.springframework.boot
spring-boot-starter-aop
@@ -71,5 +71,4 @@
1.11
-
-
+
\ No newline at end of file
diff --git a/spring-apache-camel/pom.xml b/spring-apache-camel/pom.xml
index 9c7cc14381..de7bd1287a 100644
--- a/spring-apache-camel/pom.xml
+++ b/spring-apache-camel/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
org.apache.camel
spring-apache-camel
@@ -65,4 +66,4 @@
4.3.4.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-batch-2/pom.xml b/spring-batch-2/pom.xml
index 183ad610f3..c429c272bd 100644
--- a/spring-batch-2/pom.xml
+++ b/spring-batch-2/pom.xml
@@ -51,4 +51,4 @@
2.5.1
-
+
\ No newline at end of file
diff --git a/spring-batch/pom.xml b/spring-batch/pom.xml
index 75ec0d4877..b195ff8d13 100644
--- a/spring-batch/pom.xml
+++ b/spring-batch/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-batch
@@ -24,21 +25,18 @@
${jaxb.version}
runtime
-
org.glassfish.jaxb
jaxb-runtime
${jaxb.version}
runtime
-
org.xerial
sqlite-jdbc
${sqlite.version}
-
org.springframework
spring-oxm
@@ -50,42 +48,35 @@
-
org.springframework
spring-jdbc
${spring.version}
-
org.springframework.batch
spring-batch-core
${spring.batch.version}
-
org.springframework.batch
spring-batch-test
${spring.batch.version}
-
com.opencsv
opencsv
${opencsv.version}
-
org.springframework.boot
spring-boot-starter-batch
-
org.hsqldb
hsqldb
runtime
-
org.awaitility
awaitility
@@ -103,4 +94,4 @@
3.1.1
-
+
\ No newline at end of file
diff --git a/spring-bom/pom.xml b/spring-bom/pom.xml
index e82c650fa9..7ba21ee285 100644
--- a/spring-bom/pom.xml
+++ b/spring-bom/pom.xml
@@ -1,6 +1,7 @@
-
-
+
+
4.0.0
spring-bom
1.0.0-SNAPSHOT
@@ -39,4 +40,4 @@
4.3.8.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/pom.xml b/spring-boot-modules/pom.xml
index 90be832f2c..7c94d5b7d7 100644
--- a/spring-boot-modules/pom.xml
+++ b/spring-boot-modules/pom.xml
@@ -1,13 +1,12 @@
-
+
4.0.0
-
com.baeldung.spring-boot-modules
spring-boot-modules
1.0.0-SNAPSHOT
pom
-
spring-boot-modules
@@ -77,7 +76,6 @@
spring-boot-react
-
@@ -112,4 +110,5 @@
5.6.2
2.22.2
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-1/pom.xml b/spring-boot-modules/spring-boot-1/pom.xml
index d44120b21e..9f91cc8f2e 100644
--- a/spring-boot-modules/spring-boot-1/pom.xml
+++ b/spring-boot-modules/spring-boot-1/pom.xml
@@ -1,13 +1,14 @@
-
+
4.0.0
spring-boot-1
jar
Module for Spring Boot version 1.x
-
+
com.baeldung
parent-boot-1
0.0.1-SNAPSHOT
@@ -43,4 +44,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-actuator/pom.xml b/spring-boot-modules/spring-boot-actuator/pom.xml
index 3cb324a0b8..1865974ab0 100644
--- a/spring-boot-modules/spring-boot-actuator/pom.xml
+++ b/spring-boot-modules/spring-boot-actuator/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-boot-actuator
spring-boot-actuator
@@ -12,7 +12,7 @@
org.springframework.boot
spring-boot-starter-parent
2.3.2.RELEASE
-
+
@@ -36,7 +36,6 @@
com.h2database
h2
-
org.springframework.boot
spring-boot-starter-test
@@ -68,4 +67,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-admin/pom.xml b/spring-boot-modules/spring-boot-admin/pom.xml
index 6109081723..b995b6f02e 100644
--- a/spring-boot-modules/spring-boot-admin/pom.xml
+++ b/spring-boot-modules/spring-boot-admin/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-admin
+ 0.0.1-SNAPSHOT
+ pom
+ spring-boot-admin
com.baeldung.spring-boot-modules
@@ -10,14 +15,9 @@
../
- spring-boot-admin
- 0.0.1-SNAPSHOT
- pom
-
- spring-boot-admin
-
spring-boot-admin-server
spring-boot-admin-client
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml
index f7a4b157e7..a565b94c79 100644
--- a/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml
+++ b/spring-boot-modules/spring-boot-admin/spring-boot-admin-client/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ spring-boot-admin-client
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-admin-client
+ Spring Boot Admin Client
com.baeldung.spring-boot-modules
@@ -10,13 +16,6 @@
../
- spring-boot-admin-client
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-admin-client
- Spring Boot Admin Client
-
org.springframework.boot
@@ -64,4 +63,5 @@
2.4.0
2.0.4.RELEASE
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml
index bcec12a14c..b53394cdef 100644
--- a/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml
+++ b/spring-boot-modules/spring-boot-admin/spring-boot-admin-server/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ spring-boot-admin-server
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-admin-server
+ Spring Boot Admin Server
com.baeldung.spring-boot-modules
@@ -10,19 +16,11 @@
../
- spring-boot-admin-server
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-admin-server
- Spring Boot Admin Server
-
org.springframework.boot
spring-boot-starter-web
-
@@ -30,7 +28,6 @@
spring-boot-admin-starter-server
${spring-boot-admin-server.version}
-
de.codecentric
@@ -45,7 +42,6 @@
com.hazelcast
hazelcast
-
de.codecentric
@@ -53,12 +49,10 @@
${spring-boot-admin-starter-client.version}
-
org.springframework.boot
spring-boot-starter-mail
-
org.springframework.boot
spring-boot-starter-test
@@ -87,4 +81,5 @@
1.5.7
2.0.4.RELEASE
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-angular/pom.xml b/spring-boot-modules/spring-boot-angular/pom.xml
index ac63d21bb8..89a8814d2f 100644
--- a/spring-boot-modules/spring-boot-angular/pom.xml
+++ b/spring-boot-modules/spring-boot-angular/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ com.baeldung.springbootangular
+ spring-boot-angular
+ 1.0
+ jar
+ spring-boot-angular
com.baeldung.spring-boot-modules
@@ -10,13 +16,6 @@
../
- com.baeldung.springbootangular
- spring-boot-angular
- 1.0
- jar
-
- spring-boot-angular
-
org.springframework.boot
@@ -52,4 +51,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-annotations/pom.xml b/spring-boot-modules/spring-boot-annotations/pom.xml
index 799692d51b..b495c5de04 100644
--- a/spring-boot-modules/spring-boot-annotations/pom.xml
+++ b/spring-boot-modules/spring-boot-annotations/pom.xml
@@ -1,7 +1,11 @@
-
+
4.0.0
+ spring-boot-annotations
+ war
+ spring-boot-annotations
com.baeldung.spring-boot-modules
@@ -10,23 +14,16 @@
../
- spring-boot-annotations
- war
-
- spring-boot-annotations
-
org.aspectj
aspectjweaver
${aspectjweaver.version}
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-jpa
@@ -37,12 +34,10 @@
-
org.hibernate
hibernate-core
-
org.springframework.boot
@@ -50,5 +45,5 @@
test
-
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-artifacts-2/pom.xml b/spring-boot-modules/spring-boot-artifacts-2/pom.xml
index abea13151e..8cf78b79e0 100644
--- a/spring-boot-modules/spring-boot-artifacts-2/pom.xml
+++ b/spring-boot-modules/spring-boot-artifacts-2/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-artifacts-2
+ jar
+ spring-boot-artifacts-2
+ Demo project for Spring Boot
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-artifacts-2
- jar
-
- spring-boot-artifacts-2
- Demo project for Spring Boot
-
org.springframework.boot
@@ -45,4 +44,4 @@
com.baeldung.demo.DemoApplication
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-artifacts/pom.xml b/spring-boot-modules/spring-boot-artifacts/pom.xml
index 467f931559..7ed91a6626 100644
--- a/spring-boot-modules/spring-boot-artifacts/pom.xml
+++ b/spring-boot-modules/spring-boot-artifacts/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-artifacts
+ war
+ spring-boot-artifacts
+ Demo project for Spring Boot
com.baeldung.spring-boot-modules
@@ -10,88 +15,69 @@
../
- spring-boot-artifacts
- war
-
- spring-boot-artifacts
- Demo project for Spring Boot
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-thymeleaf
provided
-
org.springframework.boot
spring-boot-starter-test
test
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-mail
-
org.springframework.boot
spring-boot-starter-actuator
-
com.h2database
h2
runtime
-
javax.persistence
javax.persistence-api
${jpa.version}
-
com.google.guava
guava
${guava.version}
-
org.subethamail
subethasmtp
${subethasmtp.version}
test
-
org.webjars
bootstrap
${bootstrap.version}
-
org.webjars
jquery
${jquery.version}
-
org.apache.httpcomponents
httpclient
${httpclient.version}
-
@@ -116,8 +102,8 @@
maven-failsafe-plugin
2.18
-
+
integration-tests
@@ -125,8 +111,8 @@
verify
-
+
**/ExternalPropertyFileLoaderIntegrationTest.java
@@ -134,7 +120,6 @@
-
pl.project13.maven
git-commit-id-plugin
@@ -160,7 +145,6 @@
${project.build.outputDirectory}/git.properties
-
@@ -213,4 +197,4 @@
4.5.8
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-autoconfiguration/pom.xml b/spring-boot-modules/spring-boot-autoconfiguration/pom.xml
index 4990e6884c..bf8bcc5a87 100644
--- a/spring-boot-modules/spring-boot-autoconfiguration/pom.xml
+++ b/spring-boot-modules/spring-boot-autoconfiguration/pom.xml
@@ -1,7 +1,13 @@
-
4.0.0
+ spring-boot-autoconfiguration
+ 0.0.1-SNAPSHOT
+ war
+ spring-boot-autoconfiguration
+ This is simple boot application demonstrating a custom auto-configuration
com.baeldung.spring-boot-modules
@@ -10,13 +16,6 @@
../
- spring-boot-autoconfiguration
- 0.0.1-SNAPSHOT
- war
-
- spring-boot-autoconfiguration
- This is simple boot application demonstrating a custom auto-configuration
-
org.springframework.boot
@@ -39,18 +38,15 @@
spring-boot-starter-test
test
-
mysql
mysql-connector-java
-
org.springframework.boot
spring-boot-configuration-processor
true
-
org.hsqldb
hsqldb
@@ -59,21 +55,19 @@
- spring-boot
+ spring-boot-autoconfiguration
src/main/resources
true
-
org.apache.maven.plugins
maven-war-plugin
-
diff --git a/spring-boot-modules/spring-boot-basic-customization-2/pom.xml b/spring-boot-modules/spring-boot-basic-customization-2/pom.xml
index 3ce9266ebe..d42a7fd3de 100644
--- a/spring-boot-modules/spring-boot-basic-customization-2/pom.xml
+++ b/spring-boot-modules/spring-boot-basic-customization-2/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-basic-customization-2
+ jar
+ spring-boot-basic-customization-2
+ Module For Spring Boot Basic Customization 2
com.baeldung.spring-boot-modules
@@ -11,18 +15,11 @@
../
- spring-boot-basic-customization-2
- jar
-
- spring-boot-basic-customization-2
- Module For Spring Boot Basic Customization 2
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -30,4 +27,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-basic-customization/pom.xml b/spring-boot-modules/spring-boot-basic-customization/pom.xml
index fc34994a85..5ab747cff1 100644
--- a/spring-boot-modules/spring-boot-basic-customization/pom.xml
+++ b/spring-boot-modules/spring-boot-basic-customization/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-basic-customization
+ jar
+ spring-boot-basic-customization
+ Module For Spring Boot Basic Customization
com.baeldung.spring-boot-modules
@@ -11,28 +15,19 @@
../
- spring-boot-basic-customization
- jar
-
- spring-boot-basic-customization
- Module For Spring Boot Basic Customization
-
org.springframework.boot
spring-boot-starter
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-thymeleaf
-
org.springframework.boot
spring-boot-starter-test
@@ -44,4 +39,5 @@
com.baeldung.changeport.CustomApplication
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-bootstrap/pom.xml b/spring-boot-modules/spring-boot-bootstrap/pom.xml
index 5f1cd8fb65..f94ee9ca31 100644
--- a/spring-boot-modules/spring-boot-bootstrap/pom.xml
+++ b/spring-boot-modules/spring-boot-bootstrap/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-bootstrap
+ jar
+ spring-boot-bootstrap
+ Demo project for Spring Boot
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-bootstrap
- jar
-
- spring-boot-bootstrap
- Demo project for Spring Boot
-
org.springframework.boot
@@ -336,4 +335,4 @@
1.0.0.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-camel/pom.xml b/spring-boot-modules/spring-boot-camel/pom.xml
index 46a90b4722..0069dfdbff 100644
--- a/spring-boot-modules/spring-boot-camel/pom.xml
+++ b/spring-boot-modules/spring-boot-camel/pom.xml
@@ -1,12 +1,13 @@
-
4.0.0
com.example
spring-boot-camel
0.0.1-SNAPSHOT
- spring-boot-camel
-
+ spring-boot-camel
+
com.baeldung
parent-boot-2
@@ -48,7 +49,6 @@
spring-boot:run
-
org.springframework.boot
@@ -68,4 +68,4 @@
3.0.0-M4
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-cassandre/README.md b/spring-boot-modules/spring-boot-cassandre/README.md
new file mode 100644
index 0000000000..14ffbb7d6b
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/README.md
@@ -0,0 +1,11 @@
+# Cassandre trading bot example
+
+This project is an example of a trading bot developed with Cassandre
+
+## Running the examples
+
+* `mvn test` - Run strategy backtesting
+* `mvn spring-boot:run` - Run the bot
+
+## Relevant Articles
+- [Build a Trading Bot with Cassandre Spring Boot Starter](https://www.baeldung.com/build-a-trading-bot-with-cassandre-spring-boot-starter/)
diff --git a/spring-boot-modules/spring-boot-cassandre/pom.xml b/spring-boot-modules/spring-boot-cassandre/pom.xml
new file mode 100644
index 0000000000..75163d2c2b
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/pom.xml
@@ -0,0 +1,68 @@
+
+
+ 4.0.0
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.4.5
+
+
+ com.example
+ demo
+ 0.0.1-SNAPSHOT
+ Cassandre trading bot tutorial
+ Cassandre trading bot tutorial
+
+ 11
+
+
+
+ org.springframework.boot
+ spring-boot-starter
+
+
+
+
+ tech.cassandre.trading.bot
+ cassandre-trading-bot-spring-boot-starter
+ 4.2.1
+
+
+ org.knowm.xchange
+ xchange-kucoin
+ 5.0.7
+
+
+ org.hsqldb
+ hsqldb
+ 2.5.1
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+ tech.cassandre.trading.bot
+ cassandre-trading-bot-spring-boot-starter-test
+ 4.2.1
+ test
+
+
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.4.5
+
+
+
+
+
diff --git a/spring-boot-modules/spring-boot-cassandre/src/main/java/com/example/demo/DemoApplication.java b/spring-boot-modules/spring-boot-cassandre/src/main/java/com/example/demo/DemoApplication.java
new file mode 100644
index 0000000000..094d95b93f
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/main/java/com/example/demo/DemoApplication.java
@@ -0,0 +1,13 @@
+package com.example.demo;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class DemoApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(DemoApplication.class, args);
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-cassandre/src/main/java/com/example/demo/MyFirstStrategy.java b/spring-boot-modules/spring-boot-cassandre/src/main/java/com/example/demo/MyFirstStrategy.java
new file mode 100644
index 0000000000..ea8ae74aa6
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/main/java/com/example/demo/MyFirstStrategy.java
@@ -0,0 +1,66 @@
+package com.example.demo;
+
+import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.CLOSED;
+import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.OPENED;
+import static tech.cassandre.trading.bot.dto.util.CurrencyDTO.BTC;
+import static tech.cassandre.trading.bot.dto.util.CurrencyDTO.USDT;
+
+import java.math.BigDecimal;
+import java.util.Optional;
+import java.util.Set;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import tech.cassandre.trading.bot.dto.market.TickerDTO;
+import tech.cassandre.trading.bot.dto.position.PositionDTO;
+import tech.cassandre.trading.bot.dto.position.PositionRulesDTO;
+import tech.cassandre.trading.bot.dto.user.AccountDTO;
+import tech.cassandre.trading.bot.dto.util.CurrencyPairDTO;
+import tech.cassandre.trading.bot.strategy.BasicCassandreStrategy;
+import tech.cassandre.trading.bot.strategy.CassandreStrategy;
+
+@CassandreStrategy
+public class MyFirstStrategy extends BasicCassandreStrategy {
+
+ private final Logger logger = LoggerFactory.getLogger(MyFirstStrategy.class);
+
+ @Override
+ public Set getRequestedCurrencyPairs() {
+ return Set.of(new CurrencyPairDTO(BTC, USDT));
+ }
+
+ @Override
+ public Optional getTradeAccount(Set accounts) {
+ return accounts.stream()
+ .filter(a -> "trade".equals(a.getName()))
+ .findFirst();
+ }
+
+ @Override
+ public void onTickerUpdate(TickerDTO ticker) {
+ logger.info("Received a new ticker : {}", ticker);
+
+ if (new BigDecimal("56000").compareTo(ticker.getLast()) == -1) {
+
+ if (canBuy(new CurrencyPairDTO(BTC, USDT), new BigDecimal("0.01"))) {
+ PositionRulesDTO rules = PositionRulesDTO.builder()
+ .stopGainPercentage(4f)
+ .stopLossPercentage(25f)
+ .build();
+ createLongPosition(new CurrencyPairDTO(BTC, USDT), new BigDecimal("0.01"), rules);
+ }
+
+ }
+ }
+
+ @Override
+ public void onPositionStatusUpdate(PositionDTO position) {
+ if (position.getStatus() == OPENED) {
+ logger.info("> New position opened : {}", position.getPositionId());
+ }
+ if (position.getStatus() == CLOSED) {
+ logger.info("> Position closed : {}", position.getDescription());
+ }
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-cassandre/src/main/resources/application.properties b/spring-boot-modules/spring-boot-cassandre/src/main/resources/application.properties
new file mode 100644
index 0000000000..5ecdabd47a
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/main/resources/application.properties
@@ -0,0 +1,22 @@
+#
+# Exchange configuration.
+cassandre.trading.bot.exchange.name=kucoin
+cassandre.trading.bot.exchange.username=kucoin.cassandre.test@gmail.com
+cassandre.trading.bot.exchange.passphrase=cassandre
+cassandre.trading.bot.exchange.key=6054ad25365ac6000689a998
+cassandre.trading.bot.exchange.secret=af080d55-afe3-47c9-8ec1-4b479fbcc5e7
+#
+# Modes
+cassandre.trading.bot.exchange.modes.sandbox=true
+cassandre.trading.bot.exchange.modes.dry=false
+#
+# Exchange API calls rates (ms or standard ISO 8601 duration like 'PT5S').
+cassandre.trading.bot.exchange.rates.account=2000
+cassandre.trading.bot.exchange.rates.ticker=2000
+cassandre.trading.bot.exchange.rates.trade=2000
+#
+# Database configuration.
+cassandre.trading.bot.database.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver
+cassandre.trading.bot.database.datasource.url=jdbc:hsqldb:mem:cassandre
+cassandre.trading.bot.database.datasource.username=sa
+cassandre.trading.bot.database.datasource.password=
diff --git a/spring-boot-modules/spring-boot-cassandre/src/test/java/com/example/demo/DemoApplicationTests.java b/spring-boot-modules/spring-boot-cassandre/src/test/java/com/example/demo/DemoApplicationTests.java
new file mode 100644
index 0000000000..eaa99696e2
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/test/java/com/example/demo/DemoApplicationTests.java
@@ -0,0 +1,13 @@
+package com.example.demo;
+
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+
+@SpringBootTest
+class DemoApplicationTests {
+
+ @Test
+ void contextLoads() {
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-cassandre/src/test/java/com/example/demo/MyFirstStrategyUnitTest.java b/spring-boot-modules/spring-boot-cassandre/src/test/java/com/example/demo/MyFirstStrategyUnitTest.java
new file mode 100644
index 0000000000..bf7c353821
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/test/java/com/example/demo/MyFirstStrategyUnitTest.java
@@ -0,0 +1,55 @@
+package com.example.demo;
+
+import static org.awaitility.Awaitility.await;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static tech.cassandre.trading.bot.dto.position.PositionStatusDTO.OPENED;
+import static tech.cassandre.trading.bot.dto.util.CurrencyDTO.USDT;
+
+import java.util.HashMap;
+
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.context.annotation.Import;
+
+import tech.cassandre.trading.bot.dto.util.CurrencyDTO;
+import tech.cassandre.trading.bot.dto.util.GainDTO;
+import tech.cassandre.trading.bot.test.mock.TickerFluxMock;
+
+@SpringBootTest
+@Import(TickerFluxMock.class)
+@DisplayName("Simple strategy test")
+public class MyFirstStrategyUnitTest {
+
+ private final Logger logger = LoggerFactory.getLogger(MyFirstStrategyUnitTest.class);
+
+ @Autowired
+ private MyFirstStrategy strategy;
+
+ @Autowired
+ private TickerFluxMock tickerFluxMock;
+
+ @Test
+ @DisplayName("Check gains")
+ public void whenTickersArrives_thenCheckGains() {
+ await().forever().until(() -> tickerFluxMock.isFluxDone());
+
+ final HashMap gains = strategy.getGains();
+
+ logger.info("Cumulated gains:");
+ gains.forEach((currency, gain) -> logger.info(currency + " : " + gain.getAmount()));
+
+ logger.info("Position still opened :");
+ strategy.getPositions()
+ .values()
+ .stream()
+ .filter(p -> p.getStatus().equals(OPENED))
+ .forEach(p -> logger.info(" - {} " + p.getDescription()));
+
+ assertTrue(gains.get(USDT).getPercentage() > 0);
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-cassandre/src/test/resources/application.properties b/spring-boot-modules/spring-boot-cassandre/src/test/resources/application.properties
new file mode 100644
index 0000000000..3d6feb09d7
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/test/resources/application.properties
@@ -0,0 +1,22 @@
+#
+# Exchange configuration.
+cassandre.trading.bot.exchange.name=kucoin
+cassandre.trading.bot.exchange.username=kucoin.cassandre.test@gmail.com
+cassandre.trading.bot.exchange.passphrase=cassandre
+cassandre.trading.bot.exchange.key=6054ad25365ac6000689a998
+cassandre.trading.bot.exchange.secret=af080d55-afe3-47c9-8ec1-4b479fbcc5e7
+#
+# Modes
+cassandre.trading.bot.exchange.modes.sandbox=true
+cassandre.trading.bot.exchange.modes.dry=true
+#
+# Exchange API calls rates (ms or standard ISO 8601 duration like 'PT5S').
+cassandre.trading.bot.exchange.rates.account=2000
+cassandre.trading.bot.exchange.rates.ticker=2000
+cassandre.trading.bot.exchange.rates.trade=2000
+#
+# Database configuration.
+cassandre.trading.bot.database.datasource.driver-class-name=org.hsqldb.jdbc.JDBCDriver
+cassandre.trading.bot.database.datasource.url=jdbc:hsqldb:mem:cassandre
+cassandre.trading.bot.database.datasource.username=sa
+cassandre.trading.bot.database.datasource.password=
diff --git a/spring-boot-modules/spring-boot-cassandre/src/test/resources/tickers-btc-usdt.tsv b/spring-boot-modules/spring-boot-cassandre/src/test/resources/tickers-btc-usdt.tsv
new file mode 100644
index 0000000000..b89bd96bdc
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/test/resources/tickers-btc-usdt.tsv
@@ -0,0 +1,89 @@
+1612569600 38294.4 39195.5 40964.2 38217.5 3882.29460938 153897343.463150723
+1612656000 39195.4 38807.6 39623.6 37341.4 2389.96820017 91972455.834535369
+1612742400 38807.6 46373.5 46767.9 38010 4971.54731481 212132648.426718929
+1612828800 46374.6 46434.8 48139.3 44961 4330.72854712 201891604.027160303
+1612915200 46430 44812.2 47300 43687.5 4351.84907778 198189685.592028516
+1613001600 44806.1 47941.5 48647.6 44005.8 4045.91883504 188171651.974437139
+1613088000 47963.1 47310.7 48958.8 46181.2 3356.01832119 159561721.419695848
+1613174400 47305.4 47152.6 48120.5 46225.5 2740.99221759 129227867.922246174
+1613260800 47152.5 48591.9 49686.9 47026.3 3359.4690565 163299915.839307312
+1613347200 48587.2 47904.4 49003.6 42841.6 3974.98461358 188990056.26923591
+1613433600 47913.1 49147.7 50619.3 47023.9 3599.85370182 176084748.845657596
+1613520000 49147.7 52118.1 52609.6 48931.1 3356.85082847 170893567.530348564
+1613606400 52114.3 51568.9 52522.9 50906.4 2183.18379408 113272339.172174965
+1613692800 51561.1 55890.5 56317.7 50727 3749.6920105 200656740.865959032
+1613779200 55893.6 55851.5 57622.6 53463.3 3394.87226216 190744601.429330887
+1613865600 55851.4 57423 58336.3 55489.6 2514.02340013 143658132.671448082
+1613952000 57420.6 54096.6 57517.8 44160 6125.32442907 330513978.457310237
+1614038400 54085.9 48908.3 54174.2 44900 8048.96505298 389277314.445372085
+1614124800 48902.9 49685.2 51361.9 47003.2 4816.75027676 239303706.844272809
+1614211200 49676.5 47082.7 52019.6 46624.4 3701.80236678 184044004.383578525
+1614297600 47082 46289.6 48408.8 44135 5329.77125908 247604118.914146591
+1614384000 46290.2 46114.4 48381.9 44836.5 2872.64640734 134946360.020429589
+1614470400 46111.3 45141.6 46626.1 43004.3 3940.17863714 175990962.484551548
+1614556800 45136.5 49590.3 49771.3 44958.9 3548.51026561 169389196.772247159
+1614643200 49590.3 48441.2 50201.6 47052.8 2936.94454126 142575425.463057812
+1614729600 48440.6 50345.5 52623.9 48100 3177.38943911 160801620.821885745
+1614816000 50347.6 48374.5 51762.1 47505.7 3624.17683614 178873453.27515484
+1614902400 48374.5 48758.9 49450 46189.8 3697.34556922 176318969.507294567
+1614988800 48746.9 48871.9 49255.1 47001 1949.15311354 94201823.810314647
+1615075200 48885 50930.4 51424.7 48885 2444.3584982 122962479.787996993
+1615161600 50956.6 52377 52387.5 49287.5 2710.99151191 137751640.241286989
+1615248000 52376.9 54867.6 54867.6 51833.8 3070.93581512 165487483.114064122
+1615334400 54867.5 55865.5 57364 52911.4 4049.50553851 224565244.752334892
+1615420800 55863.7 57781.1 58150 54238 3403.69441456 191915265.020541521
+1615507200 57781 57238.5 58057.5 55013.7 4031.0376629 228810606.091302364
+1615593600 57220.7 61180.9 61815.3 56059.3 4394.62318443 259602986.875738328
+1615680000 61174.3 59000 61700 59000 3084.33952274 186155667.656432156
+1615766400 59000 55607.1 60632.9 54525.6 5910.33518227 338468393.188725572
+1615852800 55607.1 56880.3 56918.9 53240.3 7410.49057723 409052587.523700888
+1615939200 56880.3 58875.8 58951.8 54147.5 5828.79026943 328135601.648660052
+1616025600 58882.9 57648.9 60107.7 57000 5073.7458698 297279816.540519693
+1616112000 57648.9 58024.2 59450.1 56071 3727.09434161 217005823.723994618
+1616198400 58024.3 58113.5 59874.6 57825.6 2746.52973805 161565114.165299707
+1616284800 58113.5 57350.2 58591.6 55501 3265.35649781 186845535.507151609
+1616371200 57345.3 54096.1 58415.5 53667 4219.99501831 237141977.003568352
+1616457600 54086.8 54348.4 55823.1 52986.3 4374.34046303 239135883.538398977
+1616544000 54348.4 52307.4 57200 51499.6 6416.76024581 351202326.218690674
+1616630400 52307.1 51301.7 53239.1 50455 7242.6466396 375950351.557038048
+1616716800 51301.7 55032 55062.5 51225.3 4609.48192944 245299757.451540308
+1616803200 55031.9 55820.4 56628.6 53967.5 3634.73588532 200758048.816804103
+1616889600 55820.3 55772.9 56541 54666.6 3158.20452681 176119911.151714842
+1616976000 55772.8 57628.9 58400.5 54926.5 4413.63121553 251384747.301649587
+1617062400 57630.8 58754.6 59351.9 57072.8 3563.87315049 208118726.050535887
+1617148800 58753.2 58745.9 59800 56357.5 4921.45848213 288469053.074870873
+1617235200 58745.5 58735.7 59487.1 57879 3163.98213108 186078130.901422269
+1617321600 58735.7 58963.6 60179.1 58460.7 2553.76427314 151446539.609794648
+1617408000 58963.6 57058.3 59795 56721.2 2512.19109578 147434403.06515736
+1617494400 57052.5 58201.4 58481.2 56432.6 2069.14670128 119228330.17272614
+1617580800 58201.4 59116.2 59254.1 56501 3003.76043377 174821106.684799505
+1617667200 59116.2 57988.3 59497.5 57304.8 2964.86183859 173169186.845682699
+1617753600 57988.3 55958.2 58668.6 55439 5277.04906389 299996660.411940246
+1617840000 55958.2 58076.7 58141 55700.6 3175.60482079 181817013.517575328
+1617926400 58076.7 58131.6 58900 57666.9 3516.19104669 204849717.059779284
+1618012800 58138.2 59770.2 61350 57902.1 5533.50675561 332014577.538990658
+1618099200 59770.2 60007.6 60687.4 59247.6 3896.37426019 233158562.799039154
+1618185600 60007.6 59863.4 61270.7 59417.4 4611.409014 277430208.743380477
+1618272000 59863.4 63578.7 63759.7 59815 6906.310253 430518557.569547626
+1618358400 63578.7 62958.7 64840 61000 7696.509177 487298143.928065301
+1618444800 62954.4 63152.6 63772.1 62023.9 4709.82427144 296178401.81115496
+1618531200 63152.6 61342.6 63509.7 59930.8 8295.32523869 510423835.691643255
+1618617600 61342.7 59995.2 62497.8 59599.6 5367.42979289 328364887.709585395
+1618704000 59995.3 56150.6 60409.5 49001 11485.97101449 637797282.448645379
+1618790400 56152.7 55618.8 57583.4 54205.2 7721.306905 432634348.931871989
+1618876800 55618.7 56427.8 57061.6 53328 8677.75606016 480164200.559836543
+1618963200 56426.1 53793.6 56761.7 53602 6240.82191836 345339357.806167462
+1619049600 53793.5 51696.4 55474.7 50400 8879.16016304 475394174.249706678
+1619136000 51691.2 51102.7 52112.1 47502.1 8885.07060366 441295812.644904319
+1619222400 51109.8 50033 51157.9 48676.5 4833.41744745 241336360.887795675
+1619308800 50041.5 49086.9 50554.6 46966.2 4805.34664069 237153315.222670555
+1619395200 49069 54000.2 54336.4 48775.8 6695.12934907 353727728.269533971
+1619481600 53997.1 55014.3 55439 53240.8 4344.22291318 237020455.905144335
+1619568000 55014.2 54833.2 56399.1 53808.3 4801.04618634 262912695.604761319
+1619654400 54833.1 53558.4 55181.2 52340.1 4356.05177188 234153663.397444462
+1619740800 53558.5 57697.3 57936.4 53042.6 5000.47557303 277531927.921795199
+1619827200 57697.3 57794.7 58471.4 57006.3 3639.78966647 210179438.189007639
+1619913600 57794.7 56568.5 57903.7 56044.3 3508.52428767 199206958.05741809
+1620000000 56568.5 57159.7 58977.9 56451.3 4780.43387226 276554749.540429296
+1620086400 57159.7 53196.3 57188.2 53083.3 7079.55804728 390469293.396018923
+1620172800 53196.3 57834.5 57979.7 52888 4224.63060355 233779565.506303973
diff --git a/spring-boot-modules/spring-boot-cassandre/src/test/resources/user-trade.tsv b/spring-boot-modules/spring-boot-cassandre/src/test/resources/user-trade.tsv
new file mode 100644
index 0000000000..d0fa4e9767
--- /dev/null
+++ b/spring-boot-modules/spring-boot-cassandre/src/test/resources/user-trade.tsv
@@ -0,0 +1,3 @@
+BTC 1
+USDT 100000
+ETH 10
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-ci-cd/pom.xml b/spring-boot-modules/spring-boot-ci-cd/pom.xml
index 61a2e299fb..fb1810c62e 100644
--- a/spring-boot-modules/spring-boot-ci-cd/pom.xml
+++ b/spring-boot-modules/spring-boot-ci-cd/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-ci-cd
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-ci-cd
com.baeldung.spring-boot-modules
@@ -11,18 +15,11 @@
../
- spring-boot-ci-cd
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-ci-cd
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-actuator
@@ -73,7 +70,8 @@
spring-boot-ci-cd
- java $JAVA_OPTS -jar -Dserver.port=$PORT target/${project.build.finalName}.jar
+ java $JAVA_OPTS -jar -Dserver.port=$PORT
+ target/${project.build.finalName}.jar
diff --git a/spring-boot-modules/spring-boot-client/pom.xml b/spring-boot-modules/spring-boot-client/pom.xml
index aa832497e9..7f54d0e541 100644
--- a/spring-boot-modules/spring-boot-client/pom.xml
+++ b/spring-boot-modules/spring-boot-client/pom.xml
@@ -1,7 +1,13 @@
-
4.0.0
+ spring-boot-client
+ 0.0.1-SNAPSHOT
+ war
+ spring-boot-client
+ This is simple boot client application for Spring boot actuator test
com.baeldung.spring-boot-modules
@@ -10,13 +16,6 @@
../
- spring-boot-client
- 0.0.1-SNAPSHOT
- war
-
- spring-boot-client
- This is simple boot client application for Spring boot actuator test
-
org.springframework.boot
@@ -48,7 +47,6 @@
org.springframework
spring-messaging
-
@@ -59,22 +57,17 @@
true
-
-
org.apache.maven.plugins
maven-war-plugin
-
pl.project13.maven
git-commit-id-plugin
${git-commit-id-plugin.version}
-
-
@@ -116,7 +109,7 @@
18.0
- 2.2.4
+ 2.2.4
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/pom.xml b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/pom.xml
index 9a311adfec..12a39b75fe 100644
--- a/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/pom.xml
+++ b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-application/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
data-jpa-application
0.0.1-SNAPSHOT
diff --git a/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/pom.xml b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/pom.xml
index 2da9e5aa2c..c8be287abd 100644
--- a/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/pom.xml
+++ b/spring-boot-modules/spring-boot-config-jpa-error/data-jpa-library/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
data-jpa-library
0.0.1-SNAPSHOT
diff --git a/spring-boot-modules/spring-boot-config-jpa-error/pom.xml b/spring-boot-modules/spring-boot-config-jpa-error/pom.xml
index d236a581d8..b5207f8997 100644
--- a/spring-boot-modules/spring-boot-config-jpa-error/pom.xml
+++ b/spring-boot-modules/spring-boot-config-jpa-error/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ com.baeldung.spring-boot-config-jpa-error
+ spring-boot-config-jpa-error
+ 0.0.1-SNAPSHOT
+ pom
com.baeldung.spring-boot-modules
@@ -10,11 +15,6 @@
../
- com.baeldung.spring-boot-config-jpa-error
- spring-boot-config-jpa-error
- 0.0.1-SNAPSHOT
- pom
-
data-jpa-library
data-jpa-application
@@ -38,14 +38,12 @@
spring-boot-starter-data-jpa
${spring-boot.version}
-
org.springframework.boot
spring-boot-starter-test
${spring-boot.version}
test
-
com.h2database
h2
diff --git a/spring-boot-modules/spring-boot-crud/pom.xml b/spring-boot-modules/spring-boot-crud/pom.xml
index cf1bfe6da0..79eccf2fba 100644
--- a/spring-boot-modules/spring-boot-crud/pom.xml
+++ b/spring-boot-modules/spring-boot-crud/pom.xml
@@ -1,8 +1,10 @@
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4.0.0
+ spring-boot-crud
+ spring-boot-crud
com.baeldung.spring-boot-modules
@@ -11,10 +13,6 @@
../
- spring-boot-crud
-
- spring-boot-crud
-
org.springframework.boot
@@ -86,4 +84,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-ctx-fluent/pom.xml b/spring-boot-modules/spring-boot-ctx-fluent/pom.xml
index cfbc6ffac0..8a7aca076e 100644
--- a/spring-boot-modules/spring-boot-ctx-fluent/pom.xml
+++ b/spring-boot-modules/spring-boot-ctx-fluent/pom.xml
@@ -1,7 +1,12 @@
-
4.0.0
+ spring-boot-ctx-fluent
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-ctx-fluent
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-ctx-fluent
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-ctx-fluent
-
org.springframework.boot
@@ -23,4 +22,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml
index 34cc530f2f..5c9d477502 100644
--- a/spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/greeter-library/pom.xml
@@ -1,11 +1,12 @@
-
+
4.0.0
greeter-library
0.0.1-SNAPSHOT
- greeter-library
-
+ greeter-library
+
com.baeldung.spring-boot-modules
spring-boot-custom-starter
diff --git a/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml
index 4903f21c77..d7f437633d 100644
--- a/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-autoconfigure/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
greeter-spring-boot-autoconfigure
0.0.1-SNAPSHOT
@@ -18,27 +19,23 @@
spring-boot
${spring-boot.version}
-
org.springframework.boot
spring-boot-autoconfigure
${spring-boot.version}
-
org.springframework.boot
spring-boot-configuration-processor
${spring-boot.version}
true
-
com.baeldung.spring-boot-modules
greeter-library
${greeter.version}
true
-
org.springframework.boot
spring-boot-starter-test
diff --git a/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml
index 6291756d21..815c3e8366 100644
--- a/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-sample-app/pom.xml
@@ -1,10 +1,11 @@
-
4.0.0
greeter-spring-boot-sample-app
0.0.1-SNAPSHOT
- greeter-spring-boot-sample-app
+ greeter-spring-boot-sample-app
com.baeldung.spring-boot-modules
@@ -12,34 +13,34 @@
0.0.1-SNAPSHOT
../
-
+
com.baeldung.spring-boot-modules
greeter-spring-boot-starter
${greeter-starter.version}
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
-
-
-
-
-
- org.springframework.boot
- spring-boot-maven-plugin
- ${spring-boot.version}
-
-
-
-
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ ${spring-boot.version}
+
+
+
+
0.0.1-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml
index 85a6721492..0ea27a839f 100644
--- a/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/greeter-spring-boot-starter/pom.xml
@@ -1,10 +1,11 @@
-
+
4.0.0
greeter-spring-boot-starter
0.0.1-SNAPSHOT
- greeter-spring-boot-starter
+ greeter-spring-boot-starter
com.baeldung.spring-boot-modules
@@ -13,25 +14,21 @@
-
org.springframework.boot
spring-boot-starter
${spring-boot.version}
-
com.baeldung.spring-boot-modules
greeter-spring-boot-autoconfigure
${project.version}
-
com.baeldung.spring-boot-modules
greeter-library
${greeter.version}
-
diff --git a/spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml b/spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml
index 47296990aa..f96880b1cf 100644
--- a/spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/greeter/pom.xml
@@ -1,16 +1,17 @@
-
4.0.0
greeter
0.0.1-SNAPSHOT
- greeter
-
+ greeter
+
com.baeldung
parent-boot-2
0.0.1-SNAPSHOT
../../../parent-boot-2
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/application/pom.xml b/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/application/pom.xml
index fb235bc479..948482b21b 100644
--- a/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/application/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/application/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
com.baeldung.example
diff --git a/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/library/pom.xml b/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/library/pom.xml
index d979f1d9bf..5d45de0d1d 100644
--- a/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/library/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/library/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
com.baeldung.example
diff --git a/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/pom.xml b/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/pom.xml
index 75ff927789..2a483a8fef 100644
--- a/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/parent-multi-module/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
com.baeldung
diff --git a/spring-boot-modules/spring-boot-custom-starter/pom.xml b/spring-boot-modules/spring-boot-custom-starter/pom.xml
index 338bf22f46..27e3a03153 100644
--- a/spring-boot-modules/spring-boot-custom-starter/pom.xml
+++ b/spring-boot-modules/spring-boot-custom-starter/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-custom-starter
+ 0.0.1-SNAPSHOT
+ spring-boot-custom-starter
+ pom
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-custom-starter
- 0.0.1-SNAPSHOT
- pom
-
- spring-boot-custom-starter
-
greeter-library
greeter
@@ -24,4 +23,5 @@
greeter-spring-boot-sample-app
parent-multi-module
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-data-2/pom.xml b/spring-boot-modules/spring-boot-data-2/pom.xml
index fb0d5f2053..b7006782c8 100644
--- a/spring-boot-modules/spring-boot-data-2/pom.xml
+++ b/spring-boot-modules/spring-boot-data-2/pom.xml
@@ -1,16 +1,17 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ spring-boot-data-2
+
com.baeldung.spring-boot-modules
spring-boot-modules
1.0.0-SNAPSHOT
../
- 4.0.0
- spring-boot-data-2
org.springframework.boot
diff --git a/spring-boot-modules/spring-boot-data/pom.xml b/spring-boot-modules/spring-boot-data/pom.xml
index 06f09c70fe..447b730c02 100644
--- a/spring-boot-modules/spring-boot-data/pom.xml
+++ b/spring-boot-modules/spring-boot-data/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-data
+ war
+ spring-boot-data
+ Spring Boot Data Module
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-data
- war
-
- spring-boot-data
- Spring Boot Data Module
-
org.springframework.boot
@@ -63,7 +62,6 @@
true
-
org.apache.maven.plugins
@@ -173,5 +171,5 @@
1.8
1.8
-
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-deployment/pom.xml b/spring-boot-modules/spring-boot-deployment/pom.xml
index ae546016f2..7c78d20afc 100644
--- a/spring-boot-modules/spring-boot-deployment/pom.xml
+++ b/spring-boot-modules/spring-boot-deployment/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-boot-deployment
spring-boot-deployment
@@ -19,77 +20,64 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-thymeleaf
provided
-
org.springframework.boot
spring-boot-starter-test
test
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-mail
-
org.springframework.boot
spring-boot-starter-actuator
-
com.h2database
h2
runtime
-
javax.persistence
javax.persistence-api
${jpa.version}
-
com.google.guava
guava
${guava.version}
-
org.subethamail
subethasmtp
${subethasmtp.version}
test
-
org.webjars
bootstrap
${bootstrap.version}
-
org.webjars
jquery
${jquery.version}
-
org.apache.httpcomponents
httpclient
${httpclient.version}
-
@@ -123,8 +111,8 @@
maven-failsafe-plugin
2.18
-
+
integration-tests
@@ -132,8 +120,8 @@
verify
-
+
**/ExternalPropertyFileLoaderIntegrationTest.java
@@ -192,4 +180,4 @@
4.5.8
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-di/pom.xml b/spring-boot-modules/spring-boot-di/pom.xml
index 58b427a4a8..0e9fb49a95 100644
--- a/spring-boot-modules/spring-boot-di/pom.xml
+++ b/spring-boot-modules/spring-boot-di/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-di
+ jar
+ spring-boot-di
+ Module For Spring Boot DI
com.baeldung.spring-boot-modules
@@ -11,34 +15,24 @@
../
- spring-boot-di
- jar
-
- spring-boot-di
- Module For Spring Boot DI
-
org.aspectj
aspectjweaver
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-actuator
-
org.springframework.boot
spring-boot-starter-tomcat
provided
-
org.apache.tomcat.embed
tomcat-embed-jasper
@@ -49,7 +43,6 @@
spring-boot-starter-test
test
-
@@ -69,4 +62,4 @@
com.baeldung.SpringBootDiApplication
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-disable-logging/disabling-console-jul/pom.xml b/spring-boot-modules/spring-boot-disable-logging/disabling-console-jul/pom.xml
index 798332e809..deee4e435f 100644
--- a/spring-boot-modules/spring-boot-disable-logging/disabling-console-jul/pom.xml
+++ b/spring-boot-modules/spring-boot-disable-logging/disabling-console-jul/pom.xml
@@ -1,11 +1,12 @@
-
+
4.0.0
disabling-console-jul
disabling-console-jul
-
+
com.baeldung.spring-boot-modules
spring-boot-disable-logging
diff --git a/spring-boot-modules/spring-boot-disable-logging/disabling-console-log4j2/pom.xml b/spring-boot-modules/spring-boot-disable-logging/disabling-console-log4j2/pom.xml
index f3f7fdf473..0524f9d401 100644
--- a/spring-boot-modules/spring-boot-disable-logging/disabling-console-log4j2/pom.xml
+++ b/spring-boot-modules/spring-boot-disable-logging/disabling-console-log4j2/pom.xml
@@ -1,11 +1,12 @@
-
+
4.0.0
disabling-console-log4j2
disabling-console-log4j2
-
+
com.baeldung.spring-boot-modules
spring-boot-disable-logging
diff --git a/spring-boot-modules/spring-boot-disable-logging/disabling-console-logback/pom.xml b/spring-boot-modules/spring-boot-disable-logging/disabling-console-logback/pom.xml
index 741eae4ba4..0990209ff9 100644
--- a/spring-boot-modules/spring-boot-disable-logging/disabling-console-logback/pom.xml
+++ b/spring-boot-modules/spring-boot-disable-logging/disabling-console-logback/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
disabling-console-logback
disabling-console-logback
diff --git a/spring-boot-modules/spring-boot-disable-logging/pom.xml b/spring-boot-modules/spring-boot-disable-logging/pom.xml
index 020592ee29..65de521c63 100644
--- a/spring-boot-modules/spring-boot-disable-logging/pom.xml
+++ b/spring-boot-modules/spring-boot-disable-logging/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-disable-logging
+ 1.0.0-SNAPSHOT
+ pom
+ spring-boot-disable-logging
com.baeldung.spring-boot-modules
@@ -10,15 +15,10 @@
../
- spring-boot-disable-logging
- 1.0.0-SNAPSHOT
- pom
-
- spring-boot-disable-logging
-
disabling-console-jul
disabling-console-log4j2
disabling-console-logback
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-environment/pom.xml b/spring-boot-modules/spring-boot-environment/pom.xml
index a3aab63a2d..5327825409 100644
--- a/spring-boot-modules/spring-boot-environment/pom.xml
+++ b/spring-boot-modules/spring-boot-environment/pom.xml
@@ -3,6 +3,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-environment
+ war
+ spring-boot-environment
+ Demo project for Spring Boot
com.baeldung.spring-boot-modules
@@ -11,24 +15,16 @@
../
- spring-boot-environment
- war
-
- spring-boot-environment
- Demo project for Spring Boot
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-thymeleaf
provided
-
org.springframework.boot
spring-boot-starter-test
@@ -45,58 +41,48 @@
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-mail
-
org.springframework.boot
spring-boot-starter-actuator
-
com.h2database
h2
runtime
-
javax.persistence
javax.persistence-api
${jpa.version}
-
com.google.guava
guava
${guava.version}
-
org.subethamail
subethasmtp
${subethasmtp.version}
test
-
org.springframework.cloud
spring-cloud-context
-
org.apache.httpcomponents
httpclient
${httpclient.version}
-
@@ -169,4 +155,4 @@
2020.0.0
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-exceptions/pom.xml b/spring-boot-modules/spring-boot-exceptions/pom.xml
index 1bfe8e6751..c0c335f55c 100644
--- a/spring-boot-modules/spring-boot-exceptions/pom.xml
+++ b/spring-boot-modules/spring-boot-exceptions/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-exceptions
+ jar
+ spring-boot-exceptions
+ Demo project for working with Spring Boot exceptions
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-exceptions
- jar
-
- spring-boot-exceptions
- Demo project for working with Spring Boot exceptions
-
spring-boot-exceptions
@@ -26,4 +25,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-flowable/pom.xml b/spring-boot-modules/spring-boot-flowable/pom.xml
index f1121ea6a0..fee4d9fdfc 100644
--- a/spring-boot-modules/spring-boot-flowable/pom.xml
+++ b/spring-boot-modules/spring-boot-flowable/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-flowable
+ war
+ spring-boot-flowable
+ Spring Boot Flowable Module
com.baeldung.spring-boot-modules
@@ -11,12 +15,6 @@
../
- spring-boot-flowable
- war
-
- spring-boot-flowable
- Spring Boot Flowable Module
-
org.springframework.boot
@@ -61,4 +59,5 @@
6.4.1
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-groovy/pom.xml b/spring-boot-modules/spring-boot-groovy/pom.xml
index 3392532081..ea9f3231cd 100644
--- a/spring-boot-modules/spring-boot-groovy/pom.xml
+++ b/spring-boot-modules/spring-boot-groovy/pom.xml
@@ -1,21 +1,20 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ com.baeldung.app
+ spring-boot-groovy
+ spring-boot-groovy
+ war
+ Spring Boot Todo Application with Groovy
- 4.0.0
- com.baeldung.app
- spring-boot-groovy
- spring-boot-groovy
- war
- Spring Boot Todo Application with Groovy
-
-
+
com.baeldung
parent-boot-2
0.0.1-SNAPSHOT
../../parent-boot-2
-
+
@@ -30,7 +29,6 @@
org.codehaus.groovy
groovy
-
org.springframework.boot
spring-boot-starter-test
@@ -41,7 +39,7 @@
h2
runtime
-
+
@@ -54,7 +52,7 @@
gmavenplus-plugin
1.9.0
-
+
addSources
addTestSources
@@ -65,7 +63,7 @@
removeStubs
removeTestStubs
-
+
@@ -75,4 +73,4 @@
com.baeldung.springwithgroovy.SpringBootGroovyApplication
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-jasypt/pom.xml b/spring-boot-modules/spring-boot-jasypt/pom.xml
index 2f0c8a27b4..1032500de7 100644
--- a/spring-boot-modules/spring-boot-jasypt/pom.xml
+++ b/spring-boot-modules/spring-boot-jasypt/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ com.example.jasypt
+ spring-boot-jasypt
+ jar
+ spring-boot-jasypt
+ Demo project for Spring Boot
com.baeldung.spring-boot-modules
@@ -10,31 +16,21 @@
../
- com.example.jasypt
- spring-boot-jasypt
- jar
-
- spring-boot-jasypt
- Demo project for Spring Boot
-
org.springframework.boot
spring-boot-starter
-
org.springframework.boot
spring-boot-starter-test
test
-
com.github.ulisesbocchio
jasypt-spring-boot-starter
${jasypt.version}
-
com.github.ulisesbocchio
jasypt-spring-boot
@@ -55,4 +51,4 @@
2.0.0
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-keycloak/pom.xml b/spring-boot-modules/spring-boot-keycloak/pom.xml
index cfcdcf2c37..37d57d6556 100644
--- a/spring-boot-modules/spring-boot-keycloak/pom.xml
+++ b/spring-boot-modules/spring-boot-keycloak/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.keycloak
spring-boot-keycloak
@@ -41,7 +42,6 @@
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-test
@@ -79,4 +79,4 @@
11.0.2
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-libraries-2/pom.xml b/spring-boot-modules/spring-boot-libraries-2/pom.xml
index 629b713cb5..669c07c23a 100644
--- a/spring-boot-modules/spring-boot-libraries-2/pom.xml
+++ b/spring-boot-modules/spring-boot-libraries-2/pom.xml
@@ -1,22 +1,22 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ spring-boot-libraries-2
+
spring-boot-modules
com.baeldung.spring-boot-modules
1.0.0-SNAPSHOT
- 4.0.0
-
- spring-boot-libraries-2
org.springframework.boot
spring-boot-starter-web
-
+
ch.qos.logback
logback-classic
@@ -24,15 +24,13 @@
org.springframework.data
spring-data-jpa
-
org.jobrunr
jobrunr-spring-boot-starter
${jobrunr.version}
-
-
+
org.openapitools
openapi-generator
@@ -48,13 +46,11 @@
springfox-swagger2
${springfox.version}
-
org.springframework.boot
spring-boot-starter-test
test
-
org.awaitility
awaitility
@@ -62,8 +58,8 @@
test
-
-
+
+
org.openapitools
@@ -103,4 +99,4 @@
2.9.2
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-libraries/pom.xml b/spring-boot-modules/spring-boot-libraries/pom.xml
index c96a881573..ad00629e14 100644
--- a/spring-boot-modules/spring-boot-libraries/pom.xml
+++ b/spring-boot-modules/spring-boot-libraries/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-boot-libraries
spring-boot-libraries
@@ -36,20 +36,17 @@
spring-boot-starter-test
test
-
org.togglz
togglz-spring-boot-starter
${togglz.version}
-
org.togglz
togglz-spring-security
${togglz.version}
-
com.graphql-java
@@ -65,15 +62,13 @@
com.graphql-java
graphiql-spring-boot-starter
${graphql-spring-boot-starter.version}
-
-
+
org.zalando
problem-spring-web
${problem-spring-web.version}
-
net.javacrumbs.shedlock
@@ -130,11 +125,11 @@
org.springframework.boot
spring-boot-starter-cache
-
+
javax.cache
cache-api
-
+
com.github.ben-manes.caffeine
caffeine
@@ -162,14 +157,11 @@
true
-
-
org.apache.maven.plugins
maven-war-plugin
-
pl.project13.maven
git-commit-id-plugin
@@ -195,9 +187,7 @@
${project.build.outputDirectory}/git.properties
-
-
@@ -261,4 +251,4 @@
2.8.2
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-logging-log4j2/pom.xml b/spring-boot-modules/spring-boot-logging-log4j2/pom.xml
index 4422405187..2f69870961 100644
--- a/spring-boot-modules/spring-boot-logging-log4j2/pom.xml
+++ b/spring-boot-modules/spring-boot-logging-log4j2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-boot-logging-log4j2
spring-boot-logging-log4j2
@@ -8,12 +9,11 @@
Demo project for Spring Boot Logging with Log4J2
-
org.springframework.boot
spring-boot-starter-parent
2.2.2.RELEASE
-
+
@@ -41,7 +41,6 @@
${lombok.version}
provided
-
@@ -83,4 +82,4 @@
1.18.4
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-2/pom.xml b/spring-boot-modules/spring-boot-mvc-2/pom.xml
index 580224cfd0..43e1f12efc 100644
--- a/spring-boot-modules/spring-boot-mvc-2/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc-2/pom.xml
@@ -3,6 +3,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-mvc-2
+ jar
+ spring-boot-mvc-2
+ Module For Spring Boot MVC Web Fn
com.baeldung.spring-boot-modules
@@ -11,69 +15,53 @@
../
- spring-boot-mvc-2
- jar
-
- spring-boot-mvc-2
- Module For Spring Boot MVC Web Fn
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-validation
-
org.springframework.boot
spring-boot-devtools
true
-
io.springfox
springfox-swagger2
${spring.fox.version}
-
io.springfox
springfox-swagger-ui
${spring.fox.version}
-
io.springfox
springfox-spring-webmvc
${spring.fox.version}
-
org.apache.commons
commons-lang3
-
-
- org.springframework.boot
- spring-boot-starter-data-jpa
-
-
-
- com.fasterxml.jackson.core
- jackson-databind
-
-
-
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
com.h2database
h2
-
-
+
com.thoughtworks.xstream
xstream
${xstream.version}
@@ -101,7 +89,6 @@
-
3.0.0
com.baeldung.swagger2boot.SpringBootSwaggerApplication
diff --git a/spring-boot-modules/spring-boot-mvc-3/pom.xml b/spring-boot-modules/spring-boot-mvc-3/pom.xml
index 5a5d4c3cd8..a46837e315 100644
--- a/spring-boot-modules/spring-boot-mvc-3/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc-3/pom.xml
@@ -3,6 +3,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-mvc-3
+ jar
+ spring-boot-mvc-3
+ Module For Spring Boot MVC Web
com.baeldung.spring-boot-modules
@@ -11,12 +15,6 @@
../
- spring-boot-mvc-3
- jar
-
- spring-boot-mvc-3
- Module For Spring Boot MVC Web
-
org.springframework.boot
@@ -37,4 +35,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/FilterInterceptorApp.java b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/FilterInterceptorApp.java
new file mode 100644
index 0000000000..b1e6badd43
--- /dev/null
+++ b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/FilterInterceptorApp.java
@@ -0,0 +1,11 @@
+package com.baeldung.filtersinterceptors;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication(scanBasePackages = "com.baeldung.filtersinterceptors")
+public class FilterInterceptorApp {
+ public static void main(String[] args) {
+ SpringApplication.run(FilterInterceptorApp.class, args);
+ }
+}
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/HelloConroller.java b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/HelloConroller.java
new file mode 100644
index 0000000000..db2da63d43
--- /dev/null
+++ b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/HelloConroller.java
@@ -0,0 +1,19 @@
+package com.baeldung.filtersinterceptors;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.GetMapping;
+
+@Controller
+public class HelloConroller {
+
+ private Logger logger = LoggerFactory.getLogger(HelloConroller.class);
+
+ @GetMapping("/hello")
+ public String hello() {
+ logger.info("Hello from the controller");
+ return "hello";
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/LogFilter.java b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/LogFilter.java
new file mode 100644
index 0000000000..dc78cfbbb9
--- /dev/null
+++ b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/LogFilter.java
@@ -0,0 +1,26 @@
+package com.baeldung.filtersinterceptors;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+
+@Component
+public class LogFilter implements Filter {
+
+ private Logger logger = LoggerFactory.getLogger(LogFilter.class);
+
+ @Override
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
+ logger.info("Hello from: " + request.getLocalAddr());
+ chain.doFilter(request, response);
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/LogInterceptor.java b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/LogInterceptor.java
new file mode 100644
index 0000000000..b43b69415a
--- /dev/null
+++ b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/LogInterceptor.java
@@ -0,0 +1,32 @@
+package com.baeldung.filtersinterceptors;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.stereotype.Component;
+import org.springframework.web.servlet.HandlerInterceptor;
+import org.springframework.web.servlet.ModelAndView;
+
+public class LogInterceptor implements HandlerInterceptor {
+
+ private Logger logger = LoggerFactory.getLogger(LogInterceptor.class);
+
+ @Override
+ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
+ logger.info("preHandle");
+ return true;
+ }
+
+ @Override
+ public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
+ logger.info("postHandle");
+ }
+
+ @Override
+ public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
+ logger.info("afterCompletion");
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/WebMvcConfig.java b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/WebMvcConfig.java
new file mode 100644
index 0000000000..9f4c1c2166
--- /dev/null
+++ b/spring-boot-modules/spring-boot-mvc-3/src/main/java/com/baeldung/filtersinterceptors/WebMvcConfig.java
@@ -0,0 +1,15 @@
+package com.baeldung.filtersinterceptors;
+
+import org.springframework.context.annotation.Configuration;
+import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
+
+@Configuration
+public class WebMvcConfig implements WebMvcConfigurer {
+
+ @Override
+ public void addInterceptors(InterceptorRegistry registry) {
+ registry.addInterceptor(new LogInterceptor());
+ }
+
+}
diff --git a/spring-boot-modules/spring-boot-mvc-3/src/main/resources/templates/hello.html b/spring-boot-modules/spring-boot-mvc-3/src/main/resources/templates/hello.html
new file mode 100644
index 0000000000..9a9b0e707b
--- /dev/null
+++ b/spring-boot-modules/spring-boot-mvc-3/src/main/resources/templates/hello.html
@@ -0,0 +1,10 @@
+
+
+
+Spring Filters vs Interceptors
+
+
+
+ Hello
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-birt/pom.xml b/spring-boot-modules/spring-boot-mvc-birt/pom.xml
index 4963cc3036..54a5091559 100644
--- a/spring-boot-modules/spring-boot-mvc-birt/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc-birt/pom.xml
@@ -1,31 +1,28 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-mvc-birt
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-mvc-birt
+ Module For Spring Boot Integration with BIRT
-
+
org.springframework.boot
spring-boot-starter-parent
2.1.1.RELEASE
-
+
- spring-boot-mvc-birt
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-mvc-birt
- Module For Spring Boot Integration with BIRT
-
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-logging
@@ -36,13 +33,11 @@
-
org.springframework.boot
spring-boot-starter-test
test
-
com.innoventsolutions.birt.runtime
org.eclipse.birt.runtime_4.8.0-20180626
@@ -58,7 +53,6 @@
lombok
provided
-
@@ -78,4 +72,4 @@
1.2.17
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-jersey/pom.xml b/spring-boot-modules/spring-boot-mvc-jersey/pom.xml
index ab117c4d2e..e5e4e09721 100644
--- a/spring-boot-modules/spring-boot-mvc-jersey/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc-jersey/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-mvc-jersey
+ 0.0.1-SNAPSHOT
+ pom
+ spring-boot-mvc-jersey
com.baeldung.spring-boot-modules
@@ -10,14 +15,9 @@
../
- spring-boot-mvc-jersey
- 0.0.1-SNAPSHOT
- pom
-
- spring-boot-mvc-jersey
-
spring-boot-jersey
spring-boot-mvc
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-jersey/pom.xml b/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-jersey/pom.xml
index 5756a27eca..e0b261510c 100644
--- a/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-jersey/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-jersey/pom.xml
@@ -1,25 +1,24 @@
-
+
4.0.0
+ com.baeldung.boot
+ spring-boot-jersey
+ 0.0.1-SNAPSHOT
org.springframework.boot
spring-boot-starter-parent
2.4.2
-
+
- com.baeldung.boot
- spring-boot-jersey
- 0.0.1-SNAPSHOT
-
org.springframework.boot
spring-boot-starter-jersey
-
org.springframework.boot
spring-boot-starter-test
@@ -35,4 +34,5 @@
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-mvc/pom.xml b/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-mvc/pom.xml
index 69d355e574..77c8027974 100644
--- a/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-mvc/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc-jersey/spring-boot-mvc/pom.xml
@@ -1,25 +1,24 @@
-
+
4.0.0
+ com.baeldung.boot
+ spring-boot-mvc
+ 0.0.1-SNAPSHOT
org.springframework.boot
spring-boot-starter-parent
2.4.2
-
+
- com.baeldung.boot
- spring-boot-mvc
- 0.0.1-SNAPSHOT
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -35,4 +34,5 @@
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-mvc/pom.xml b/spring-boot-modules/spring-boot-mvc/pom.xml
index 560ea1cffa..fdaedb51df 100644
--- a/spring-boot-modules/spring-boot-mvc/pom.xml
+++ b/spring-boot-modules/spring-boot-mvc/pom.xml
@@ -3,6 +3,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-mvc
+ jar
+ spring-boot-mvc
+ Module For Spring Boot MVC
com.baeldung.spring-boot-modules
@@ -11,14 +15,7 @@
../
- spring-boot-mvc
- jar
-
- spring-boot-mvc
- Module For Spring Boot MVC
-
-
org.springframework.boot
spring-boot-starter-web
@@ -44,39 +41,33 @@
org.springframework.boot
spring-boot-starter-data-rest
-
mysql
mysql-connector-java
-
org.hsqldb
hsqldb
runtime
-
org.glassfish
javax.faces
${javax.faces.version}
-
org.springframework.boot
spring-boot-starter-test
test
-
com.rometools
rome
${rome.version}
-
org.hibernate.validator
@@ -90,14 +81,12 @@
org.springframework.boot
spring-boot-starter-validation
-
io.springfox
springfox-boot-starter
${spring.fox.version}
-
org.aspectj
@@ -109,7 +98,6 @@
aspectjweaver
${aspectjweaver.version}
-
@@ -133,4 +121,4 @@
com.baeldung.springbootmvc.SpringBootMvcApplication
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-nashorn/pom.xml b/spring-boot-modules/spring-boot-nashorn/pom.xml
index ca0b726a47..debde50595 100644
--- a/spring-boot-modules/spring-boot-nashorn/pom.xml
+++ b/spring-boot-modules/spring-boot-nashorn/pom.xml
@@ -1,8 +1,13 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ com.baeldung.nashorn
+ spring-boot-nashorn
+ 1.0
+ jar
+ spring-boot-nashorn
com.baeldung.spring-boot-modules
@@ -11,13 +16,6 @@
../
- com.baeldung.nashorn
- spring-boot-nashorn
- 1.0
- jar
-
- spring-boot-nashorn
-
org.springframework.boot
@@ -50,5 +48,5 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-parent/pom.xml b/spring-boot-modules/spring-boot-parent/pom.xml
index ebd3cd5d36..365a3a2639 100644
--- a/spring-boot-modules/spring-boot-parent/pom.xml
+++ b/spring-boot-modules/spring-boot-parent/pom.xml
@@ -1,8 +1,13 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-parent
+ 1.0.0-SNAPSHOT
+ pom
+ spring-boot-parent
+ spring-boot-parent
com.baeldung.spring-boot-modules
@@ -11,15 +16,9 @@
../
- spring-boot-parent
- 1.0.0-SNAPSHOT
- pom
-
- spring-boot-parent
- spring-boot-parent
-
spring-boot-with-starter-parent
spring-boot-with-custom-parent
-
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-parent/spring-boot-with-custom-parent/pom.xml b/spring-boot-modules/spring-boot-parent/spring-boot-with-custom-parent/pom.xml
index 63d6078eca..a61a5fd057 100644
--- a/spring-boot-modules/spring-boot-parent/spring-boot-with-custom-parent/pom.xml
+++ b/spring-boot-modules/spring-boot-parent/spring-boot-with-custom-parent/pom.xml
@@ -1,8 +1,11 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-with-custom-parent
+ 1.0.0-SNAPSHOT
+ spring-boot-with-custom-parent
com.baeldung.spring-boot-modules
@@ -11,11 +14,6 @@
../
- spring-boot-with-custom-parent
- 1.0.0-SNAPSHOT
-
- spring-boot-with-custom-parent
-
org.springframework.boot
@@ -23,4 +21,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-parent/spring-boot-with-starter-parent/pom.xml b/spring-boot-modules/spring-boot-parent/spring-boot-with-starter-parent/pom.xml
index 4274f63aa3..184becb657 100644
--- a/spring-boot-modules/spring-boot-parent/spring-boot-with-starter-parent/pom.xml
+++ b/spring-boot-modules/spring-boot-parent/spring-boot-with-starter-parent/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ com.baeldung
+ spring-boot-with-starter-parent
+ 1.0.0-SNAPSHOT
+ spring-boot-with-starter-parent
com.baeldung.spring-boot-modules
@@ -11,12 +15,6 @@
../
- com.baeldung
- spring-boot-with-starter-parent
- 1.0.0-SNAPSHOT
-
- spring-boot-with-starter-parent
-
@@ -41,4 +39,4 @@
2.2.5.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-performance/pom.xml b/spring-boot-modules/spring-boot-performance/pom.xml
index 053f68eea3..02cef986d0 100644
--- a/spring-boot-modules/spring-boot-performance/pom.xml
+++ b/spring-boot-modules/spring-boot-performance/pom.xml
@@ -1,7 +1,11 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-performance
+ war
+ spring-boot-performance
+ This is a simple Spring Boot application taking advantage of the latest Spring Boot improvements/features. Current version: 2.2
com.baeldung.spring-boot-modules
@@ -10,23 +14,15 @@
../
- spring-boot-performance
- war
-
- spring-boot-performance
- This is a simple Spring Boot application taking advantage of the latest Spring Boot improvements/features. Current version: 2.2
-
org.springframework.boot
spring-boot-starter
-
org.springframework.boot
spring-boot-starter-web
-
de.codecentric
chaos-monkey-spring-boot
@@ -42,7 +38,6 @@
true
-
org.apache.maven.plugins
@@ -56,4 +51,4 @@
com.baeldung.lazyinitialization.Application
2.0.0
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-properties-2/pom.xml b/spring-boot-modules/spring-boot-properties-2/pom.xml
index e777b8f318..62f23da450 100644
--- a/spring-boot-modules/spring-boot-properties-2/pom.xml
+++ b/spring-boot-modules/spring-boot-properties-2/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ spring-boot-properties-2
+ jar
+ 0.0.1-SNAPSHOT
+ spring-boot-properties-2
+ Spring Boot Properties Module
com.baeldung.spring-boot-modules
@@ -10,13 +16,6 @@
../
- spring-boot-properties-2
- jar
- 0.0.1-SNAPSHOT
-
- spring-boot-properties-2
- Spring Boot Properties Module
-
org.springframework.boot
@@ -28,4 +27,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-properties-3/pom.xml b/spring-boot-modules/spring-boot-properties-3/pom.xml
index 33799b557d..400229a662 100644
--- a/spring-boot-modules/spring-boot-properties-3/pom.xml
+++ b/spring-boot-modules/spring-boot-properties-3/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ spring-boot-properties-3
+ 0.0.1-SNAPSHOT
+ spring-boot-properties-3
+ Spring Boot Properties Module
+
com.baeldung.spring-boot-modules
spring-boot-modules
@@ -9,11 +15,6 @@
../
- spring-boot-properties-3
- 0.0.1-SNAPSHOT
- spring-boot-properties-3
- Spring Boot Properties Module
-
org.springframework.boot
@@ -39,4 +40,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml
index 10570bb738..0f048ffa14 100644
--- a/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml
+++ b/spring-boot-modules/spring-boot-properties-3/src/main/resources/application.yml
@@ -15,6 +15,7 @@ spring:
username: SA
bael:
property: stagingValue
+ stagingProperty: stagingPropertyValue
---
application:
servers:
diff --git a/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/StagingMultidocumentFilesIntegrationTest.java b/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/StagingMultidocumentFilesIntegrationTest.java
index e02d1de272..851d5e0432 100644
--- a/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/StagingMultidocumentFilesIntegrationTest.java
+++ b/spring-boot-modules/spring-boot-properties-3/src/test/java/com/baeldung/boot/properties/multidocument/StagingMultidocumentFilesIntegrationTest.java
@@ -17,14 +17,18 @@ public class StagingMultidocumentFilesIntegrationTest {
@Value("${bael.property}")
private String baelCustomProperty;
-
+
+ @Value("${bael.stagingProperty}")
+ private String baelStagingProperty;
+
@Value("${bael.root-level-property}")
private String baelRootProperty;
@Test
- @Disabled("Fix and update https://www.baeldung.com/spring-boot-yaml-vs-properties article")
public void givenProductionProfileActive_whenApplicationStarts_thenDefaultPropertiesUser() {
- assertThat(baelCustomProperty).isEqualTo("stagingValue");
+ assertThat(baelStagingProperty).isEqualTo("stagingPropertyValue");
+ // application.properties is loaded after the application.yml file and overrides the values
+ assertThat(baelCustomProperty).isEqualTo("defaultValue");
assertThat(baelRootProperty).isEqualTo("defaultRootLevelValue");
}
}
diff --git a/spring-boot-modules/spring-boot-properties/pom.xml b/spring-boot-modules/spring-boot-properties/pom.xml
index 0a7d8a8cbf..adeb41e976 100644
--- a/spring-boot-modules/spring-boot-properties/pom.xml
+++ b/spring-boot-modules/spring-boot-properties/pom.xml
@@ -3,6 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-properties
+ jar
+ 0.0.1-SNAPSHOT
+ spring-boot-properties
+ Spring Boot Properties Module
com.baeldung.spring-boot-modules
@@ -11,13 +16,6 @@
../
- spring-boot-properties
- jar
- 0.0.1-SNAPSHOT
-
- spring-boot-properties
- Spring Boot Properties Module
-
commons-configuration
@@ -76,7 +74,6 @@
true
-
org.apache.maven.plugins
@@ -142,4 +139,4 @@
com.baeldung.yaml.MyApplication
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-property-exp/pom.xml b/spring-boot-modules/spring-boot-property-exp/pom.xml
index 2da25fca31..0d55a531c0 100644
--- a/spring-boot-modules/spring-boot-property-exp/pom.xml
+++ b/spring-boot-modules/spring-boot-property-exp/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-boot-property-exp
spring-boot-property-exp
@@ -18,4 +19,4 @@
property-exp-custom-config
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml
index 07aeca9ad2..08fd911e6a 100644
--- a/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml
+++ b/spring-boot-modules/spring-boot-property-exp/property-exp-custom-config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
property-exp-custom-config
0.0.1-SNAPSHOT
@@ -81,4 +82,4 @@
2.7
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml
index 79e194a3b5..496004b0e2 100644
--- a/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml
+++ b/spring-boot-modules/spring-boot-property-exp/property-exp-default-config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
property-exp-default-config
0.0.1-SNAPSHOT
@@ -37,4 +38,4 @@
Custom Property Value
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-react/pom.xml b/spring-boot-modules/spring-boot-react/pom.xml
index 157ec65b35..f1e10ae12d 100644
--- a/spring-boot-modules/spring-boot-react/pom.xml
+++ b/spring-boot-modules/spring-boot-react/pom.xml
@@ -1,7 +1,9 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ spring-boot-react
spring-boot-modules
@@ -9,44 +11,28 @@
1.0.0-SNAPSHOT
- 4.0.0
-
- spring-boot-react
-
-
- 11
- 11
- 1.6
- v10.14.2
- v1.12.1
-
-
org.springframework.boot
spring-boot-starter-web
2.4.4
-
org.springframework.boot
spring-boot-starter-data-jpa
2.4.4
-
com.h2database
h2
1.4.200
runtime
-
com.github.javafaker
javafaker
1.0.2
-
org.springframework.boot
spring-boot-starter-test
@@ -128,13 +114,19 @@
-
org.springframework.boot
spring-boot-maven-plugin
-
+
+ 11
+ 11
+ 1.6
+ v10.14.2
+ v1.12.1
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-runtime-2/pom.xml b/spring-boot-modules/spring-boot-runtime-2/pom.xml
index 8f6351165a..2c97f63746 100644
--- a/spring-boot-modules/spring-boot-runtime-2/pom.xml
+++ b/spring-boot-modules/spring-boot-runtime-2/pom.xml
@@ -1,7 +1,12 @@
-
4.0.0
+ spring-boot-runtime-2
+ jar
+ spring-boot-runtime-2
+ Demo project for Spring Boot
com.baeldung.spring-boot-modules
@@ -10,19 +15,11 @@
../
- spring-boot-runtime-2
- jar
-
- spring-boot-runtime-2
- Demo project for Spring Boot
-
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -63,4 +60,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-runtime/pom.xml b/spring-boot-modules/spring-boot-runtime/pom.xml
index 54bae61520..92b1458cf6 100644
--- a/spring-boot-modules/spring-boot-runtime/pom.xml
+++ b/spring-boot-modules/spring-boot-runtime/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-runtime
+ jar
+ spring-boot-runtime
+ Demo project for Spring Boot Runtime
com.baeldung.spring-boot-modules
@@ -10,103 +15,81 @@
../
- spring-boot-runtime
- jar
-
- spring-boot-runtime
- Demo project for Spring Boot Runtime
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-validation
-
org.springframework.boot
spring-boot-starter-thymeleaf
provided
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-mail
-
org.springframework.boot
spring-boot-starter-actuator
-
org.springframework.boot
spring-boot-starter-security
-
org.springframework.cloud
spring-cloud-starter
${springcloud.version}
-
org.springframework.boot
spring-boot-starter-test
test
-
commons-io
commons-io
${commons-io.version}
-
org.springframework.security
spring-security-test
-
com.h2database
h2
runtime
-
javax.persistence
javax.persistence-api
${jpa.version}
-
com.google.guava
guava
${guava.version}
-
org.subethamail
subethasmtp
${subethasmtp.version}
test
-
org.apache.httpcomponents
httpclient
${httpclient.version}
-
@@ -117,4 +100,4 @@
4.5.8
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-security/pom.xml b/spring-boot-modules/spring-boot-security/pom.xml
index 3f8d2ff73f..11e5a38eeb 100644
--- a/spring-boot-modules/spring-boot-security/pom.xml
+++ b/spring-boot-modules/spring-boot-security/pom.xml
@@ -1,7 +1,12 @@
-
+
4.0.0
+ spring-boot-security
+ jar
+ spring-boot-security
+ Spring Boot Security Auto-Configuration
com.baeldung.spring-boot-modules
@@ -10,12 +15,6 @@
../
- spring-boot-security
- jar
-
- spring-boot-security
- Spring Boot Security Auto-Configuration
-
org.springframework.boot
@@ -40,13 +39,11 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.security
spring-security-taglibs
-
org.apache.tomcat.embed
@@ -57,7 +54,6 @@
javax.servlet
jstl
-
org.springframework.boot
spring-boot-starter-test
@@ -89,4 +85,4 @@
2.2.2.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-springdoc/pom.xml b/spring-boot-modules/spring-boot-springdoc/pom.xml
index 8442504fed..892fbfe4ca 100644
--- a/spring-boot-modules/spring-boot-springdoc/pom.xml
+++ b/spring-boot-modules/spring-boot-springdoc/pom.xml
@@ -1,9 +1,13 @@
-
4.0.0
+ spring-boot-springdoc
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-springdoc
+ Project for Springdoc integration
com.baeldung.spring-boot-modules
@@ -12,13 +16,6 @@
../
- spring-boot-springdoc
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-springdoc
- Project for Springdoc integration
-
org.springframework.boot
@@ -36,19 +33,16 @@
com.h2database
h2
-
org.springframework.boot
spring-boot-starter-test
test
-
-
+
org.hibernate
hibernate-core
${hibernate.version}
-
org.springdoc
@@ -59,10 +53,9 @@
org.springdoc
springdoc-openapi-data-rest
${springdoc.version}
-
-
-
-
+
+
+
org.springframework.restdocs
spring-restdocs-mockmvc
test
@@ -71,8 +64,7 @@
org.springframework.restdocs
spring-restdocs-restassured
test
-
-
+
org.springdoc
@@ -119,8 +111,8 @@
-
-
+
+
kotlin-maven-plugin
org.jetbrains.kotlin
${kotlin.version}
@@ -162,20 +154,12 @@
application.properties
data.sql
- schema.sql
+ schema.sql
-
- 5.2.10.Final
- 1.5.2
- 1.5.6
- 1.4.0
- ${project.build.directory}/generated-snippets
-
-
integration
@@ -223,4 +207,12 @@
+
+ 5.2.10.Final
+ 1.5.2
+ 1.5.6
+ 1.4.0
+ ${project.build.directory}/generated-snippets
+
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-swagger-jwt/pom.xml b/spring-boot-modules/spring-boot-swagger-jwt/pom.xml
index 6ee7db2ac9..c296b06388 100644
--- a/spring-boot-modules/spring-boot-swagger-jwt/pom.xml
+++ b/spring-boot-modules/spring-boot-swagger-jwt/pom.xml
@@ -3,6 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-swagger-jwt
+ 0.1.0-SNAPSHOT
+ spring-boot-swagger-jwt
+ jar
+ Module For Spring Boot Swagger UI
com.baeldung.spring-boot-modules
@@ -10,13 +15,7 @@
1.0.0-SNAPSHOT
../
-
- spring-boot-swagger-jwt
- 0.1.0-SNAPSHOT
- spring-boot-swagger-jwt
- jar
-
- Module For Spring Boot Swagger UI
+
org.springframework.boot
@@ -42,4 +41,4 @@
3.0.0
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-swagger/pom.xml b/spring-boot-modules/spring-boot-swagger/pom.xml
index 2d80cae4d5..a9d8a943e4 100644
--- a/spring-boot-modules/spring-boot-swagger/pom.xml
+++ b/spring-boot-modules/spring-boot-swagger/pom.xml
@@ -3,6 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-swagger
+ 0.1.0-SNAPSHOT
+ spring-boot-swagger
+ jar
+ Module For Spring Boot Swagger
com.baeldung.spring-boot-modules
@@ -10,13 +15,7 @@
1.0.0-SNAPSHOT
../
-
- spring-boot-swagger
- 0.1.0-SNAPSHOT
- spring-boot-swagger
- jar
-
- Module For Spring Boot Swagger
+
org.springframework.boot
@@ -42,4 +41,4 @@
3.0.0
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-testing/README.md b/spring-boot-modules/spring-boot-testing/README.md
index 1b7ad661c6..058c78c9bb 100644
--- a/spring-boot-modules/spring-boot-testing/README.md
+++ b/spring-boot-modules/spring-boot-testing/README.md
@@ -15,3 +15,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Testing Spring Boot @ConfigurationProperties](https://www.baeldung.com/spring-boot-testing-configurationproperties)
- [Prevent ApplicationRunner or CommandLineRunner Beans From Executing During Junit Testing](https://www.baeldung.com/spring-junit-prevent-runner-beans-testing-execution)
- [Testing in Spring Boot](https://www.baeldung.com/spring-boot-testing)
+- [Fixing the NoSuchMethodError JUnit Error](https://www.baeldung.com/junit-nosuchmethoderror)
diff --git a/spring-boot-modules/spring-boot-testing/pom.xml b/spring-boot-modules/spring-boot-testing/pom.xml
index 50a1ace2fa..1860818b7b 100644
--- a/spring-boot-modules/spring-boot-testing/pom.xml
+++ b/spring-boot-modules/spring-boot-testing/pom.xml
@@ -1,8 +1,12 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot-testing
+ war
+ spring-boot-testing
+ This is simple boot application for demonstrating testing features.
com.baeldung.spring-boot-modules
@@ -11,12 +15,6 @@
../
- spring-boot-testing
- war
-
- spring-boot-testing
- This is simple boot application for demonstrating testing features.
-
org.springframework.boot
@@ -62,7 +60,6 @@
-
it.ozimov
@@ -77,20 +74,17 @@
${spock.version}
test
-
org.spockframework
spock-spring
${spock.version}
test
-
io.rest-assured
rest-assured
test
-
@@ -101,14 +95,11 @@
true
-
-
org.apache.maven.plugins
maven-war-plugin
-
pl.project13.maven
git-commit-id-plugin
@@ -134,7 +125,6 @@
${project.build.outputDirectory}/git.properties
-
org.codehaus.gmavenplus
gmavenplus-plugin
@@ -159,4 +149,4 @@
0.7.2
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-vue/pom.xml b/spring-boot-modules/spring-boot-vue/pom.xml
index 9973246115..3d3d51797c 100644
--- a/spring-boot-modules/spring-boot-vue/pom.xml
+++ b/spring-boot-modules/spring-boot-vue/pom.xml
@@ -1,7 +1,13 @@
-
+
4.0.0
+ spring-boot-vue
+ 0.0.1-SNAPSHOT
+ jar
+ spring-boot-vue
+ Demo project for Spring Boot Vue project
com.baeldung.spring-boot-modules
@@ -10,25 +16,16 @@
../
- spring-boot-vue
- 0.0.1-SNAPSHOT
- jar
-
- spring-boot-vue
- Demo project for Spring Boot Vue project
-
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
test
-
org.springframework.boot
@@ -45,4 +42,4 @@
-
+
\ No newline at end of file
diff --git a/spring-boot-modules/spring-boot-xml/pom.xml b/spring-boot-modules/spring-boot-xml/pom.xml
index e1ddd8f437..b3fd343e4f 100644
--- a/spring-boot-modules/spring-boot-xml/pom.xml
+++ b/spring-boot-modules/spring-boot-xml/pom.xml
@@ -1,7 +1,10 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ 4.0.0
+ spring-boot-xml
+
parent-boot-2
com.baeldung
@@ -9,10 +12,6 @@
../../parent-boot-2
- 4.0.0
-
- spring-boot-xml
-
org.springframework.boot
diff --git a/spring-boot-modules/spring-boot/pom.xml b/spring-boot-modules/spring-boot/pom.xml
index 9023ae92f3..8df16a1f9c 100644
--- a/spring-boot-modules/spring-boot/pom.xml
+++ b/spring-boot-modules/spring-boot/pom.xml
@@ -3,6 +3,11 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
+ spring-boot
+ 0.0.1-SNAPSHOT
+ war
+ spring-boot
+ This is simple boot application for Spring boot actuator test
com.baeldung.spring-boot-modules
@@ -11,13 +16,6 @@
../
- spring-boot
- 0.0.1-SNAPSHOT
- war
-
- spring-boot
- This is simple boot application for Spring boot actuator test
-
org.springframework.boot
@@ -47,12 +45,10 @@
org.springframework.boot
spring-boot-starter-actuator
-
org.springframework.boot
spring-boot-starter-tomcat
-
org.springframework.boot
spring-boot-starter-test
@@ -69,17 +65,14 @@
-
io.dropwizard.metrics
metrics-core
-
com.h2database
h2
-
org.springframework.boot
spring-boot-starter
@@ -89,25 +82,21 @@
json-path
test
-
com.google.guava
guava
${guava.version}
-
org.apache.tomcat
tomcat-servlet-api
${tomee-servlet-api.version}
provided
-
org.apache.activemq
artemis-server
-
com.rometools
rome
@@ -123,14 +112,11 @@
true
-
-
org.apache.maven.plugins
maven-war-plugin
-
org.apache.maven.plugins
maven-resources-plugin
@@ -142,7 +128,6 @@
-
@@ -191,4 +176,4 @@
@
-
+
\ No newline at end of file
diff --git a/spring-boot-rest-2/README.md b/spring-boot-rest-2/README.md
index f09159198c..41270d58ea 100644
--- a/spring-boot-rest-2/README.md
+++ b/spring-boot-rest-2/README.md
@@ -1,3 +1,4 @@
### Relevant Article:
- [Get All Endpoints in Spring Boot](https://www.baeldung.com/spring-boot-get-all-endpoints)
+- [HTTP PUT vs. POST in REST API](https://www.baeldung.com/rest-http-put-vs-post)
diff --git a/spring-boot-rest-2/pom.xml b/spring-boot-rest-2/pom.xml
index d74c393f27..0560d6c9c7 100644
--- a/spring-boot-rest-2/pom.xml
+++ b/spring-boot-rest-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.web
spring-boot-rest-2
@@ -30,6 +30,15 @@
springfox-boot-starter
3.0.0
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ com.h2database
+ h2
+ runtime
+
diff --git a/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/Address.java b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/Address.java
new file mode 100644
index 0000000000..5c005c70f0
--- /dev/null
+++ b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/Address.java
@@ -0,0 +1,57 @@
+package com.baeldung.putvspost;
+
+import javax.persistence.Entity;
+import javax.persistence.GeneratedValue;
+import javax.persistence.Id;
+
+@Entity
+public class Address {
+
+ private @Id @GeneratedValue Long id;
+ private String name;
+ private String city;
+ private String postalCode;
+
+ Address() {
+ }
+
+ public Address(String name, String city, String postalCode) {
+ this.name = name;
+ this.city = city;
+ this.postalCode = postalCode;
+ }
+
+ public Long getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public String getPostalCode() {
+ return postalCode;
+ }
+
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+
+ @Override
+ public String toString() {
+ return "Address [id=" + id + ", name=" + name + ", city=" + city + ", postalCode=" + postalCode + "]";
+ }
+
+}
diff --git a/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/AddressController.java b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/AddressController.java
new file mode 100644
index 0000000000..f989d5c211
--- /dev/null
+++ b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/AddressController.java
@@ -0,0 +1,57 @@
+package com.baeldung.putvspost;
+
+import java.util.List;
+import java.util.Optional;
+
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+public class AddressController {
+
+ private final AddressRepository repository;
+
+ AddressController(AddressRepository repository) {
+ this.repository = repository;
+ }
+
+ @GetMapping("/addresses")
+ List getAllAddresses() {
+ return repository.findAll();
+ }
+
+ @GetMapping("/addresses/{id}")
+ Optional getAddressesById(@PathVariable Long id) {
+ return repository.findById(id);
+ }
+
+ @PostMapping("/addresses")
+ Address createNewAddress(@RequestBody Address newAddress) {
+ return repository.save(newAddress);
+ }
+
+ @PutMapping("/addresses/{id}")
+ Address replaceEmployee(@RequestBody Address newAddress, @PathVariable Long id) {
+
+ return repository.findById(id)
+ .map(address -> {
+ address.setCity(newAddress.getCity());
+ address.setPostalCode(newAddress.getPostalCode());
+ return repository.save(address);
+ })
+ .orElseGet(() -> {
+ return repository.save(newAddress);
+ });
+ }
+
+ @DeleteMapping("/addresses/{id}")
+ void deleteEmployee(@PathVariable Long id) {
+ repository.deleteById(id);
+ }
+
+}
diff --git a/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/AddressRepository.java b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/AddressRepository.java
new file mode 100644
index 0000000000..415a3c9030
--- /dev/null
+++ b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/AddressRepository.java
@@ -0,0 +1,7 @@
+package com.baeldung.putvspost;
+
+import org.springframework.data.jpa.repository.JpaRepository;
+
+public interface AddressRepository extends JpaRepository {
+
+}
diff --git a/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/PutVsPostApplication.java b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/PutVsPostApplication.java
new file mode 100644
index 0000000000..8cea53d269
--- /dev/null
+++ b/spring-boot-rest-2/src/main/java/com/baeldung/putvspost/PutVsPostApplication.java
@@ -0,0 +1,13 @@
+package com.baeldung.putvspost;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class PutVsPostApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(PutVsPostApplication.class, args);
+ }
+
+}
diff --git a/spring-boot-rest/pom.xml b/spring-boot-rest/pom.xml
index 10dacf99e8..72d4ecfaa6 100644
--- a/spring-boot-rest/pom.xml
+++ b/spring-boot-rest/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.web
spring-boot-rest
@@ -35,7 +35,6 @@
xstream
${xstream.version}
-
com.h2database
h2
@@ -44,26 +43,21 @@
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.boot
spring-boot-starter-data-rest
-
org.springframework.boot
spring-boot-starter-hateoas
-
-
com.google.guava
guava
${guava.version}
-
org.springframework.boot
spring-boot-starter-test
@@ -96,5 +90,5 @@
1.4.11.1
2.3.5
-
-
+
+
\ No newline at end of file
diff --git a/spring-caching-2/README.md b/spring-caching-2/README.md
new file mode 100644
index 0000000000..1375b5e8e4
--- /dev/null
+++ b/spring-caching-2/README.md
@@ -0,0 +1,3 @@
+### Relevant articles:
+
+- [Spring Boot Cache with Redis](https://www.baeldung.com/spring-boot-redis-cache)
diff --git a/spring-caching-2/pom.xml b/spring-caching-2/pom.xml
new file mode 100644
index 0000000000..6bb828e8bf
--- /dev/null
+++ b/spring-caching-2/pom.xml
@@ -0,0 +1,66 @@
+
+
+ 4.0.0
+ spring-caching-2
+ 0.1-SNAPSHOT
+ spring-caching-2
+ war
+
+
+ com.baeldung
+ parent-boot-2
+ 0.0.1-SNAPSHOT
+ ../parent-boot-2
+
+
+
+ 0.7.3
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.boot
+ spring-boot-starter-data-jpa
+
+
+ org.springframework.data
+ spring-data-commons
+
+
+ com.h2database
+ h2
+ runtime
+
+
+ org.projectlombok
+ lombok
+
+
+ org.springframework.boot
+ spring-boot-starter-cache
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+ it.ozimov
+ embedded-redis
+ ${embedded.redis.version}
+
+
+ org.slf4j
+ slf4j-simple
+
+
+ test
+
+
+
diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/redis/CacheConfig.java b/spring-caching-2/src/main/java/com/baeldung/caching/redis/CacheConfig.java
new file mode 100644
index 0000000000..89bdc2779d
--- /dev/null
+++ b/spring-caching-2/src/main/java/com/baeldung/caching/redis/CacheConfig.java
@@ -0,0 +1,33 @@
+package com.baeldung.caching.redis;
+
+import org.springframework.boot.autoconfigure.cache.RedisCacheManagerBuilderCustomizer;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.data.redis.cache.RedisCacheConfiguration;
+import org.springframework.data.redis.serializer.GenericJackson2JsonRedisSerializer;
+
+import java.time.Duration;
+
+import static org.springframework.data.redis.serializer.RedisSerializationContext.SerializationPair;
+
+@Configuration
+public class CacheConfig {
+
+ @Bean
+ public RedisCacheManagerBuilderCustomizer redisCacheManagerBuilderCustomizer() {
+ return (builder) -> builder
+ .withCacheConfiguration("itemCache",
+ RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofMinutes(10)))
+ .withCacheConfiguration("customerCache",
+ RedisCacheConfiguration.defaultCacheConfig().entryTtl(Duration.ofMinutes(5)));
+ }
+
+ @Bean
+ public RedisCacheConfiguration cacheConfiguration() {
+ return RedisCacheConfiguration.defaultCacheConfig()
+ .entryTtl(Duration.ofMinutes(60))
+ .disableCachingNullValues()
+ .serializeValuesWith(SerializationPair.fromSerializer(new GenericJackson2JsonRedisSerializer()));
+ }
+
+}
diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/redis/Item.java b/spring-caching-2/src/main/java/com/baeldung/caching/redis/Item.java
new file mode 100644
index 0000000000..d6115a4833
--- /dev/null
+++ b/spring-caching-2/src/main/java/com/baeldung/caching/redis/Item.java
@@ -0,0 +1,21 @@
+package com.baeldung.caching.redis;
+
+import lombok.AllArgsConstructor;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import javax.persistence.Entity;
+import javax.persistence.Id;
+import java.io.Serializable;
+
+@Data
+@Entity
+@AllArgsConstructor
+@NoArgsConstructor
+public class Item implements Serializable {
+
+ @Id
+ String id;
+
+ String description;
+}
diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemController.java b/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemController.java
new file mode 100644
index 0000000000..63122c5938
--- /dev/null
+++ b/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemController.java
@@ -0,0 +1,19 @@
+package com.baeldung.caching.redis;
+
+import lombok.AllArgsConstructor;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@AllArgsConstructor
+public class ItemController {
+
+ private final ItemService itemService;
+
+ @GetMapping("/item/{id}")
+ public Item getItemById(@PathVariable String id) {
+ return itemService.getItemForId(id);
+ }
+
+}
diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemRepository.java b/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemRepository.java
new file mode 100644
index 0000000000..d6222de621
--- /dev/null
+++ b/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemRepository.java
@@ -0,0 +1,6 @@
+package com.baeldung.caching.redis;
+
+import org.springframework.data.repository.CrudRepository;
+
+public interface ItemRepository extends CrudRepository- {
+}
diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemService.java b/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemService.java
new file mode 100644
index 0000000000..6a59c7d74e
--- /dev/null
+++ b/spring-caching-2/src/main/java/com/baeldung/caching/redis/ItemService.java
@@ -0,0 +1,19 @@
+package com.baeldung.caching.redis;
+
+import lombok.AllArgsConstructor;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+
+@Service
+@AllArgsConstructor
+public class ItemService {
+
+ private final ItemRepository itemRepository;
+
+ @Cacheable(value = "itemCache")
+ public Item getItemForId(String id) {
+ return itemRepository.findById(id)
+ .orElseThrow(RuntimeException::new);
+ }
+
+}
diff --git a/spring-caching-2/src/main/java/com/baeldung/caching/redis/RedisCacheApplication.java b/spring-caching-2/src/main/java/com/baeldung/caching/redis/RedisCacheApplication.java
new file mode 100644
index 0000000000..3b337def01
--- /dev/null
+++ b/spring-caching-2/src/main/java/com/baeldung/caching/redis/RedisCacheApplication.java
@@ -0,0 +1,14 @@
+package com.baeldung.caching.redis;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.cache.annotation.EnableCaching;
+
+@SpringBootApplication
+@EnableCaching
+public class RedisCacheApplication {
+
+ public static void main(String[] args) {
+ SpringApplication.run(RedisCacheApplication.class, args);
+ }
+}
diff --git a/spring-caching-2/src/main/resources/application.properties b/spring-caching-2/src/main/resources/application.properties
new file mode 100644
index 0000000000..080185b620
--- /dev/null
+++ b/spring-caching-2/src/main/resources/application.properties
@@ -0,0 +1,12 @@
+spring.datasource.url=jdbc:h2:mem:testdb;DB_CLOSE_ON_EXIT=FALSE
+spring.datasource.driverClassName=org.h2.Driver
+spring.datasource.username=sa
+spring.datasource.password=
+
+# Enabling H2 Console
+spring.h2.console.enabled=true
+spring.h2.console.path=/h2
+
+# Connection details
+#spring.redis.host=localhost
+#spring.redis.port=6379
diff --git a/spring-caching-2/src/main/resources/data.sql b/spring-caching-2/src/main/resources/data.sql
new file mode 100644
index 0000000000..74e359b877
--- /dev/null
+++ b/spring-caching-2/src/main/resources/data.sql
@@ -0,0 +1 @@
+INSERT INTO ITEM VALUES('abc','ITEM1');
\ No newline at end of file
diff --git a/spring-caching-2/src/test/java/com/baeldung/caching/redis/ItemServiceCachingIntegrationTest.java b/spring-caching-2/src/test/java/com/baeldung/caching/redis/ItemServiceCachingIntegrationTest.java
new file mode 100644
index 0000000000..71a9729efd
--- /dev/null
+++ b/spring-caching-2/src/test/java/com/baeldung/caching/redis/ItemServiceCachingIntegrationTest.java
@@ -0,0 +1,84 @@
+package com.baeldung.caching.redis;
+
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
+import org.springframework.boot.autoconfigure.cache.CacheAutoConfiguration;
+import org.springframework.boot.autoconfigure.data.redis.RedisAutoConfiguration;
+import org.springframework.boot.test.context.TestConfiguration;
+import org.springframework.boot.test.mock.mockito.MockBean;
+import org.springframework.cache.CacheManager;
+import org.springframework.cache.annotation.EnableCaching;
+import org.springframework.context.annotation.Import;
+import org.springframework.test.context.junit.jupiter.SpringExtension;
+import redis.embedded.RedisServer;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import java.util.Optional;
+
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.verify;
+
+@Import({ CacheConfig.class, ItemService.class })
+@ExtendWith(SpringExtension.class)
+@ImportAutoConfiguration(classes = { CacheAutoConfiguration.class, RedisAutoConfiguration.class })
+@EnableCaching
+class ItemServiceCachingIntegrationTest {
+
+ private static final String AN_ID = "id-1";
+ private static final String A_DESCRIPTION = "an item";
+
+ @MockBean
+ private ItemRepository mockItemRepository;
+
+ @Autowired
+ private ItemService itemService;
+
+ @Autowired
+ private CacheManager cacheManager;
+
+ @Test
+ void givenRedisCaching_whenFindItemById_thenItemReturnedFromCache() {
+ Item anItem = new Item(AN_ID, A_DESCRIPTION);
+ given(mockItemRepository.findById(AN_ID))
+ .willReturn(Optional.of(anItem));
+
+ Item itemCacheMiss = itemService.getItemForId(AN_ID);
+ Item itemCacheHit = itemService.getItemForId(AN_ID);
+
+ assertThat(itemCacheMiss).isEqualTo(anItem);
+ assertThat(itemCacheHit).isEqualTo(anItem);
+
+ verify(mockItemRepository, times(1)).findById(AN_ID);
+ assertThat(itemFromCache()).isEqualTo(anItem);
+ }
+
+ private Object itemFromCache() {
+ return cacheManager.getCache("itemCache").get(AN_ID).get();
+ }
+
+ @TestConfiguration
+ static class EmbeddedRedisConfiguration {
+
+ private final RedisServer redisServer;
+
+ public EmbeddedRedisConfiguration() {
+ this.redisServer = new RedisServer();
+ }
+
+ @PostConstruct
+ public void startRedis() {
+ redisServer.start();
+ }
+
+ @PreDestroy
+ public void stopRedis() {
+ this.redisServer.stop();
+ }
+ }
+
+}
diff --git a/spring-caching-2/src/test/resources/logback-test.xml b/spring-caching-2/src/test/resources/logback-test.xml
new file mode 100644
index 0000000000..215403c6a5
--- /dev/null
+++ b/spring-caching-2/src/test/resources/logback-test.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/spring-caching/pom.xml b/spring-caching/pom.xml
index c620072604..34c035a8ec 100644
--- a/spring-caching/pom.xml
+++ b/spring-caching/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-caching
0.1-SNAPSHOT
@@ -76,7 +76,9 @@
spring-data-commons
+
3.5.2
-
+
+
\ No newline at end of file
diff --git a/spring-cloud-bus/pom.xml b/spring-cloud-bus/pom.xml
index 82d0bccd0b..938d6d4bb8 100644
--- a/spring-cloud-bus/pom.xml
+++ b/spring-cloud-bus/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.spring.cloud
spring-cloud-bus
@@ -37,4 +37,4 @@
2020.0.0
-
+
\ No newline at end of file
diff --git a/spring-cloud-bus/spring-cloud-config-client/pom.xml b/spring-cloud-bus/spring-cloud-config-client/pom.xml
index cc1c237646..28e7568266 100644
--- a/spring-cloud-bus/spring-cloud-config-client/pom.xml
+++ b/spring-cloud-bus/spring-cloud-config-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-config-client
spring-cloud-config-client
@@ -22,23 +23,19 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
test
-
org.springframework.boot
spring-boot-actuator
-
org.springframework.boot
spring-boot-actuator-autoconfigure
-
org.springframework.cloud
spring-cloud-starter-bus-amqp
@@ -54,4 +51,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud-bus/spring-cloud-config-server/pom.xml b/spring-cloud-bus/spring-cloud-config-server/pom.xml
index a61008f3dd..03616b26af 100644
--- a/spring-cloud-bus/spring-cloud-config-server/pom.xml
+++ b/spring-cloud-bus/spring-cloud-config-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-config-server
spring-cloud-config-server
@@ -18,23 +19,19 @@
org.springframework.cloud
spring-cloud-config-server
-
org.springframework.boot
spring-boot-starter-security
-
org.springframework.boot
spring-boot-starter-test
test
-
org.springframework.cloud
spring-cloud-config-monitor
-
org.springframework.cloud
spring-cloud-starter-stream-rabbit
@@ -50,4 +47,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/apache-spark-job/pom.xml b/spring-cloud-data-flow/apache-spark-job/pom.xml
index a4816a30ba..4f2ef6cd6c 100644
--- a/spring-cloud-data-flow/apache-spark-job/pom.xml
+++ b/spring-cloud-data-flow/apache-spark-job/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
apache-spark-job
apache-spark-job
diff --git a/spring-cloud-data-flow/batch-job/pom.xml b/spring-cloud-data-flow/batch-job/pom.xml
index 6b02b000e1..edb7e34389 100644
--- a/spring-cloud-data-flow/batch-job/pom.xml
+++ b/spring-cloud-data-flow/batch-job/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
batch-job
@@ -26,18 +27,16 @@
-
+
org.springframework.cloud
spring-cloud-starter-task
-
org.springframework.boot
spring-boot-starter-batch
-
com.h2database
h2
@@ -49,4 +48,4 @@
2.2.3.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/pom.xml b/spring-cloud-data-flow/pom.xml
index 5b516146ae..f81daeeabc 100644
--- a/spring-cloud-data-flow/pom.xml
+++ b/spring-cloud-data-flow/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-data-flow
0.0.1-SNAPSHOT
@@ -21,4 +22,4 @@
apache-spark-job
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-mongodb-sink/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-mongodb-sink/pom.xml
index f4557335d6..a2a9bf1980 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-mongodb-sink/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-mongodb-sink/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
customer-mongodb-sink
customer-mongodb-sink
@@ -63,4 +64,4 @@
Hoxton.SR4
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-transform/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-transform/pom.xml
index 81f194c772..067d25ec26 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-transform/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-etl/customer-transform/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
customer-transform
customer-transform
@@ -55,4 +56,4 @@
Hoxton.SR4
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-etl/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-etl/pom.xml
index 91abdf3442..ffdd153f15 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-etl/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-etl/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-data-flow-etl
0.0.1-SNAPSHOT
@@ -18,4 +19,4 @@
customer-transform
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml
index 34da489cd1..5dc8459e10 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-server/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
data-flow-server
0.0.1-SNAPSHOT
@@ -64,4 +64,4 @@
5.2.12.Final
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-shell/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-shell/pom.xml
index cc37e76aa4..61c1b16581 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-shell/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/data-flow-shell/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
data-flow-shell
0.0.1-SNAPSHOT
@@ -46,4 +47,4 @@
1.1.0.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/log-sink/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/log-sink/pom.xml
index 186e5b1886..79d1447207 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/log-sink/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/log-sink/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
log-sink
0.0.1-SNAPSHOT
@@ -25,7 +26,7 @@
-
+
org.springframework.cloud
@@ -37,4 +38,4 @@
Hoxton.SR4
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/pom.xml
index e794287e10..678ba1c6ac 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-data-flow-stream-processing
@@ -21,13 +22,13 @@
time-processor
log-sink
-
+
-
+
org.springframework.boot
spring-boot-starter-test
test
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-processor/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-processor/pom.xml
index b4ad84cfe9..083ce87ae6 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-processor/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-processor/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
time-processor
0.0.1-SNAPSHOT
@@ -37,4 +38,4 @@
Hoxton.SR4
-
+
\ No newline at end of file
diff --git a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-source/pom.xml b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-source/pom.xml
index 05908d3c52..1808198a5d 100644
--- a/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-source/pom.xml
+++ b/spring-cloud-data-flow/spring-cloud-data-flow-stream-processing/time-source/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
time-source
@@ -38,4 +39,4 @@
Hoxton.SR4
-
+
\ No newline at end of file
diff --git a/spring-cloud/pom.xml b/spring-cloud/pom.xml
index ac717e85da..83e7175869 100644
--- a/spring-cloud/pom.xml
+++ b/spring-cloud/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud
@@ -43,7 +44,7 @@
spring-cloud-ribbon-retry
spring-cloud-circuit-breaker
spring-cloud-eureka-self-preservation
-
+
spring-cloud-sentinel
@@ -88,4 +89,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/additional-sources-simple/pom.xml b/spring-cloud/spring-cloud-archaius/additional-sources-simple/pom.xml
index cc20511fc6..249cbe579f 100644
--- a/spring-cloud/spring-cloud-archaius/additional-sources-simple/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/additional-sources-simple/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
additional-sources-simple
1.0.0-SNAPSHOT
@@ -21,5 +21,5 @@
spring-boot-starter-web
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/basic-config/pom.xml b/spring-cloud/spring-cloud-archaius/basic-config/pom.xml
index a13fff2f9d..bdcef5b704 100644
--- a/spring-cloud/spring-cloud-archaius/basic-config/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/basic-config/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
basic-config
1.0.0-SNAPSHOT
@@ -21,5 +21,5 @@
spring-boot-starter-web
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/dynamodb-config/pom.xml b/spring-cloud/spring-cloud-archaius/dynamodb-config/pom.xml
index 9ff267425c..aa203670e0 100644
--- a/spring-cloud/spring-cloud-archaius/dynamodb-config/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/dynamodb-config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
dynamodb-config
dynamodb-config
@@ -45,5 +46,5 @@
5.0.3
0.7.6
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml b/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml
index 70f736642c..0c8f1e16a7 100644
--- a/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
extra-configs
1.0.0-SNAPSHOT
@@ -41,5 +41,5 @@
2.0.1.RELEASE
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/jdbc-config/pom.xml b/spring-cloud/spring-cloud-archaius/jdbc-config/pom.xml
index b7e4917bea..9523c187e1 100644
--- a/spring-cloud/spring-cloud-archaius/jdbc-config/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/jdbc-config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
jdbc-config
jdbc-config
@@ -28,5 +29,5 @@
runtime
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/pom.xml b/spring-cloud/spring-cloud-archaius/pom.xml
index df8162efa5..56d7f0bc93 100644
--- a/spring-cloud/spring-cloud-archaius/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-archaius
1.0.0-SNAPSHOT
@@ -63,5 +63,5 @@
2.0.1.RELEASE
1.2.0
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-archaius/zookeeper-config/pom.xml b/spring-cloud/spring-cloud-archaius/zookeeper-config/pom.xml
index 25eaf4435c..f54373d572 100644
--- a/spring-cloud/spring-cloud-archaius/zookeeper-config/pom.xml
+++ b/spring-cloud/spring-cloud-archaius/zookeeper-config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
zookeeper-config
zookeeper-config
@@ -46,5 +47,5 @@
2.0.0.RELEASE
3.4.13
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-aws/pom.xml b/spring-cloud/spring-cloud-aws/pom.xml
index f65db6a2fe..a8225c7f02 100644
--- a/spring-cloud/spring-cloud-aws/pom.xml
+++ b/spring-cloud/spring-cloud-aws/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-aws
@@ -32,23 +33,19 @@
org.springframework.cloud
spring-cloud-starter-aws-messaging
-
org.springframework.boot
spring-boot-starter-test
test
-
org.postgresql
postgresql
-
mysql
mysql-connector-java
-
@@ -67,7 +64,6 @@
com.baeldung.spring.cloud.aws.SpringCloudAwsApplication
Dalston.SR4
2.2.1.RELEASE
-
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/config/pom.xml b/spring-cloud/spring-cloud-bootstrap/config/pom.xml
index 6ebf23637e..706c5695d3 100644
--- a/spring-cloud/spring-cloud-bootstrap/config/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
config
1.0.0-SNAPSHOT
@@ -42,7 +43,6 @@
Brixton.SR7
-
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml b/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml
index 729abb4f05..da2dee97d5 100644
--- a/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/customer-service/pom.xml
@@ -1,7 +1,7 @@
-
-
+
4.0.0
com.baeldung.customerservice
customer-service
@@ -72,4 +72,5 @@
1.8
1.8
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml b/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml
index d77e29768f..fb06c6052b 100644
--- a/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/discovery/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
discovery
1.0.0-SNAPSHOT
@@ -38,7 +39,6 @@
org.springframework.boot
spring-boot-starter-security
-
org.springframework.session
spring-session
@@ -51,7 +51,6 @@
Edgware.SR5
-
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml b/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml
index 34b7af7c0a..1a6296ac4f 100644
--- a/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/gateway/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
gateway
1.0.0-SNAPSHOT
@@ -42,7 +43,6 @@
org.springframework.boot
spring-boot-starter-security
-
org.springframework.session
spring-session
@@ -51,7 +51,6 @@
org.springframework.boot
spring-boot-starter-data-redis
-
org.springframework.cloud
spring-cloud-starter-zipkin
@@ -60,7 +59,6 @@
org.springframework.cloud
spring-cloud-starter-feign
-
@@ -77,15 +75,15 @@
-
-
-
+ dir="${project.basedir}/src/main/angular/ui">
+
+
+
-
-
+ dir="${project.basedir}/src/main/angular/ui">
+
+
@@ -100,7 +98,6 @@
Dalston.RELEASE
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/order-service/order-client/pom.xml b/spring-cloud/spring-cloud-bootstrap/order-service/order-client/pom.xml
index 01e8afeec3..dc6e196325 100644
--- a/spring-cloud/spring-cloud-bootstrap/order-service/order-client/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/order-service/order-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.orderservice
order-client
@@ -14,4 +15,5 @@
order-service
1.0.0-SNAPSHOT
+
diff --git a/spring-cloud/spring-cloud-bootstrap/order-service/order-server/pom.xml b/spring-cloud/spring-cloud-bootstrap/order-service/order-server/pom.xml
index d6c521c5df..85143b557e 100644
--- a/spring-cloud/spring-cloud-bootstrap/order-service/order-server/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/order-service/order-server/pom.xml
@@ -1,16 +1,18 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.orderservice
order-server
1.0.0-SNAPSHOT
+
order-service
com.baeldung.orderservice
1.0.0-SNAPSHOT
+
com.baeldung.orderservice
diff --git a/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml b/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml
index 2ebc673ef4..64be52f5f4 100644
--- a/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/order-service/pom.xml
@@ -1,7 +1,7 @@
-
-
+
4.0.0
com.baeldung.orderservice
order-service
@@ -119,4 +119,4 @@
com.baeldung.orderservice.OrderApplication
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/pom.xml b/spring-cloud/spring-cloud-bootstrap/pom.xml
index eb1a55c2a9..deba342d69 100644
--- a/spring-cloud/spring-cloud-bootstrap/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-bootstrap
1.0.0-SNAPSHOT
@@ -24,4 +25,4 @@
order-service
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml b/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml
index de0785bd45..b1aa205af5 100644
--- a/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/svc-book/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
svc-book
@@ -43,7 +44,6 @@
org.springframework.boot
spring-boot-starter-security
-
org.springframework.session
spring-session
@@ -52,28 +52,23 @@
org.springframework.boot
spring-boot-starter-data-redis
-
org.springframework.boot
spring-boot-starter-data-jpa
-
com.h2database
h2
runtime
-
org.springframework.cloud
spring-cloud-starter-zipkin
-
Dalston.RELEASE
-
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml b/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml
index 0cce78276a..e189eeea81 100644
--- a/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/svc-rating/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
svc-rating
@@ -31,7 +32,6 @@
org.springframework.boot
spring-boot-starter-security
-
org.springframework.session
spring-session
@@ -40,12 +40,10 @@
org.springframework.boot
spring-boot-starter-data-redis
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework.cloud
spring-cloud-starter-hystrix
@@ -54,18 +52,15 @@
org.springframework.boot
spring-boot-starter-actuator
-
com.h2database
h2
runtime
-
org.springframework.cloud
spring-cloud-starter-zipkin
-
@@ -82,7 +77,6 @@
Dalston.RELEASE
-
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml b/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml
index b83c5a2aaa..ba96f23795 100644
--- a/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml
+++ b/spring-cloud/spring-cloud-bootstrap/zipkin/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
zipkin
1.0.0-SNAPSHOT
@@ -22,18 +23,15 @@
org.springframework.cloud
spring-cloud-starter-eureka
-
io.zipkin.java
zipkin-server
-
io.zipkin.java
zipkin-autoconfigure-ui
runtime
-
@@ -50,7 +48,6 @@
Brixton.SR7
-
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-circuit-breaker/pom.xml b/spring-cloud/spring-cloud-circuit-breaker/pom.xml
index 680d835c19..ebf89d671c 100644
--- a/spring-cloud/spring-cloud-circuit-breaker/pom.xml
+++ b/spring-cloud/spring-cloud-circuit-breaker/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-circuit-breaker
spring-cloud-circuit-breaker
@@ -14,20 +14,6 @@
..
-
-
- spring-release
- Spring Release
- https://repo.spring.io/release
-
- false
-
-
- true
-
-
-
-
@@ -56,4 +42,4 @@
1.0.2.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-config/client/pom.xml b/spring-cloud/spring-cloud-config/client/pom.xml
index 2400520d2b..00b5ba2edc 100644
--- a/spring-cloud/spring-cloud-config/client/pom.xml
+++ b/spring-cloud/spring-cloud-config/client/pom.xml
@@ -47,4 +47,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-config/pom.xml b/spring-cloud/spring-cloud-config/pom.xml
index bfe17044e0..1e46b9accb 100644
--- a/spring-cloud/spring-cloud-config/pom.xml
+++ b/spring-cloud/spring-cloud-config/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-config
@@ -36,4 +37,4 @@
2020.0.0
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-config/server/pom.xml b/spring-cloud/spring-cloud-config/server/pom.xml
index f0f1e43612..c59b6583f2 100644
--- a/spring-cloud/spring-cloud-config/server/pom.xml
+++ b/spring-cloud/spring-cloud-config/server/pom.xml
@@ -51,4 +51,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-connectors-heroku/pom.xml b/spring-cloud/spring-cloud-connectors-heroku/pom.xml
index d318aa3c64..e02da23f6c 100644
--- a/spring-cloud/spring-cloud-connectors-heroku/pom.xml
+++ b/spring-cloud/spring-cloud-connectors-heroku/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-connectors-heroku
@@ -59,5 +60,5 @@
Hoxton.SR4
42.2.10
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-consul/pom.xml b/spring-cloud/spring-cloud-consul/pom.xml
index 4d4ac0aa01..f21550e360 100644
--- a/spring-cloud/spring-cloud-consul/pom.xml
+++ b/spring-cloud/spring-cloud-consul/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-consul
@@ -12,7 +13,7 @@
spring-cloud
1.0.0-SNAPSHOT
-
+
jitpack.io
@@ -26,7 +27,6 @@
spring-cloud-starter-consul-all
${spring-cloud-starter-consul.version}
-
org.springframework.cloud
spring-cloud-starter-consul-config
@@ -45,12 +45,12 @@
com.github.kinguinltdhk
leadership-consul
${kinguinltdhk.version}
-
+
- com.ecwid.consul
- consul-api
+ com.ecwid.consul
+ consul-api
-
+
@@ -60,4 +60,4 @@
com.baeldung.spring.cloud.consul.discovery.DiscoveryClientApplication
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-contract/pom.xml b/spring-cloud/spring-cloud-contract/pom.xml
index f26f1d7e3b..1d12656f98 100644
--- a/spring-cloud/spring-cloud-contract/pom.xml
+++ b/spring-cloud/spring-cloud-contract/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-contract
1.0.0-SNAPSHOT
@@ -56,5 +57,5 @@
2.1.1.RELEASE
2.1.4.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-contract/spring-cloud-contract-consumer/pom.xml b/spring-cloud/spring-cloud-contract/spring-cloud-contract-consumer/pom.xml
index 7616032320..c99dd0bd5a 100644
--- a/spring-cloud/spring-cloud-contract/spring-cloud-contract-consumer/pom.xml
+++ b/spring-cloud/spring-cloud-contract/spring-cloud-contract-consumer/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-contract-consumer
1.0.0-SNAPSHOT
@@ -42,4 +43,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-contract/spring-cloud-contract-producer/pom.xml b/spring-cloud/spring-cloud-contract/spring-cloud-contract-producer/pom.xml
index e909dbc253..736a2530b2 100644
--- a/spring-cloud/spring-cloud-contract/spring-cloud-contract-producer/pom.xml
+++ b/spring-cloud/spring-cloud-contract/spring-cloud-contract-producer/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-contract-producer
1.0.0-SNAPSHOT
@@ -49,4 +50,4 @@
2.1.1.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-docker/docker-message-server/pom.xml b/spring-cloud/spring-cloud-docker/docker-message-server/pom.xml
index fafd291c00..0cc235f706 100644
--- a/spring-cloud/spring-cloud-docker/docker-message-server/pom.xml
+++ b/spring-cloud/spring-cloud-docker/docker-message-server/pom.xml
@@ -2,7 +2,6 @@
-
4.0.0
docker-message-server
docker-message-server
@@ -52,4 +51,5 @@
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-docker/docker-product-server/pom.xml b/spring-cloud/spring-cloud-docker/docker-product-server/pom.xml
index a5bd6c50ea..be65a6d7d3 100644
--- a/spring-cloud/spring-cloud-docker/docker-product-server/pom.xml
+++ b/spring-cloud/spring-cloud-docker/docker-product-server/pom.xml
@@ -2,7 +2,6 @@
-
4.0.0
docker-product-server
docker-product-server
@@ -52,4 +51,5 @@
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-docker/pom.xml b/spring-cloud/spring-cloud-docker/pom.xml
index a9d978c9d4..3e407df6a1 100644
--- a/spring-cloud/spring-cloud-docker/pom.xml
+++ b/spring-cloud/spring-cloud-docker/pom.xml
@@ -1,8 +1,7 @@
-
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-docker
spring-cloud-docker
diff --git a/spring-cloud/spring-cloud-eureka-self-preservation/pom.xml b/spring-cloud/spring-cloud-eureka-self-preservation/pom.xml
index 41ebba7d79..26353f8297 100644
--- a/spring-cloud/spring-cloud-eureka-self-preservation/pom.xml
+++ b/spring-cloud/spring-cloud-eureka-self-preservation/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud.eureka
spring-cloud-eureka-self-preservation
@@ -34,4 +35,4 @@
Greenwich.SR3
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-client/pom.xml b/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-client/pom.xml
index fc7d8bec33..f2670a5114 100644
--- a/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-client/pom.xml
+++ b/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka-client
spring-cloud-eureka-client
@@ -37,4 +38,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-server/pom.xml b/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-server/pom.xml
index 02d1c8c354..b21e5100ef 100644
--- a/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-server/pom.xml
+++ b/spring-cloud/spring-cloud-eureka-self-preservation/spring-cloud-eureka-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka-server
spring-cloud-eureka-server
@@ -33,4 +34,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka/pom.xml b/spring-cloud/spring-cloud-eureka/pom.xml
index 9d7350e774..5cf0a74868 100644
--- a/spring-cloud/spring-cloud-eureka/pom.xml
+++ b/spring-cloud/spring-cloud-eureka/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka
1.0.0-SNAPSHOT
@@ -36,4 +37,4 @@
Greenwich.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml
index dc6a1ae236..a3c78154a2 100644
--- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml
+++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka-client
1.0.0-SNAPSHOT
@@ -45,4 +46,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client-integration-test/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client-integration-test/pom.xml
index 95b1275e2c..4fdfe2d9c2 100644
--- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client-integration-test/pom.xml
+++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client-integration-test/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka-feign-client-integration-test
1.0.0-SNAPSHOT
@@ -38,48 +39,40 @@
org.springframework.cloud
spring-cloud-starter-openfeign
-
org.springframework.cloud
spring-cloud-starter-netflix-ribbon
-
org.springframework.cloud
spring-cloud-starter-netflix-eureka-client
-
org.springframework.boot
spring-boot-starter-web
-
com.github.tomakehurst
wiremock
2.27.2
test
-
org.projectlombok
lombok
-
org.testcontainers
testcontainers
1.14.3
test
-
org.awaitility
awaitility
4.0.3
test
-
@@ -94,4 +87,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml
index e0d63dc15d..b51fd11e29 100644
--- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml
+++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-feign-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka-feign-client
1.0.0-SNAPSHOT
@@ -53,4 +54,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml
index 9c0a933753..9c8e6f3e70 100644
--- a/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml
+++ b/spring-cloud/spring-cloud-eureka/spring-cloud-eureka-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-eureka-server
1.0.0-SNAPSHOT
@@ -41,4 +42,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-functions/pom.xml b/spring-cloud/spring-cloud-functions/pom.xml
index 0be3941db1..5f5376ddc9 100644
--- a/spring-cloud/spring-cloud-functions/pom.xml
+++ b/spring-cloud/spring-cloud-functions/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.spring
spring-cloud-functions
@@ -16,15 +16,15 @@
0.0.1-SNAPSHOT
../../parent-boot-2
-
+
org.springframework.cloud
spring-cloud-function-adapter-aws
${spring-cloud-function.version}
-
-
+
+
org.springframework.cloud
spring-cloud-starter-function-web
@@ -86,7 +86,6 @@
2.0.2
1.1.0
1.0.10.RELEASE
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-gateway/pom.xml b/spring-cloud/spring-cloud-gateway/pom.xml
index c9c087d738..eaa0d12cfd 100644
--- a/spring-cloud/spring-cloud-gateway/pom.xml
+++ b/spring-cloud/spring-cloud-gateway/pom.xml
@@ -45,19 +45,16 @@
org.springframework.cloud
spring-cloud-starter-gateway
-
org.springframework.cloud
spring-cloud-starter-circuitbreaker-reactor-resilience4j
-
org.springframework.boot
spring-boot-starter-data-redis-reactive
-
it.ozimov
@@ -65,7 +62,6 @@
${redis.version}
test
-
org.hibernate
hibernate-validator-cdi
@@ -79,7 +75,6 @@
org.springframework.boot
spring-boot-starter-actuator
-
org.springframework.boot
spring-boot-starter-test
@@ -108,4 +103,4 @@
5.5.2
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml b/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml
index 204cb8765c..ea46ae3293 100644
--- a/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml
+++ b/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
feign-rest-consumer
1.0.0-SNAPSHOT
@@ -78,4 +78,4 @@
1.0.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-hystrix/pom.xml b/spring-cloud/spring-cloud-hystrix/pom.xml
index 4aec8050ff..4fa0a31d62 100644
--- a/spring-cloud/spring-cloud-hystrix/pom.xml
+++ b/spring-cloud/spring-cloud-hystrix/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-hystrix
1.0.0-SNAPSHOT
@@ -21,4 +21,4 @@
feign-rest-consumer
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml b/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml
index e96dc478a4..73a0859785 100644
--- a/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml
+++ b/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rest-consumer
1.0.0-SNAPSHOT
@@ -56,7 +57,6 @@
org.springframework.boot
spring-boot-starter-actuator
-
org.springframework.boot
spring-boot-starter-test
@@ -69,4 +69,4 @@
1.10.19
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml b/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml
index e7be8f2c58..4843c592c9 100644
--- a/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml
+++ b/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
rest-producer
1.0.0-SNAPSHOT
@@ -19,7 +20,6 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -32,4 +32,4 @@
1.10.19
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml
index 8e543db326..e916f2bc3e 100644
--- a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
client-service
client-service
@@ -87,4 +88,4 @@
1.1.8.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/travel-agency-service/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/travel-agency-service/pom.xml
index 5ab017043c..c6c6de94c3 100644
--- a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/travel-agency-service/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/travel-agency-service/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
travel-agency-service
1.0-SNAPSHOT
@@ -27,7 +28,6 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-actuator
diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-backend/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-backend/pom.xml
index 5bd7d3f5ea..81455eb259 100644
--- a/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-backend/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-backend/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
demo-backend
demo-backend
@@ -17,7 +18,6 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -34,4 +34,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-frontend/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-frontend/pom.xml
index 004fabeb09..558b2cfc3c 100644
--- a/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-frontend/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-minikube/demo-frontend/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
demo-frontend
demo-frontend
@@ -17,7 +18,6 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -33,4 +33,5 @@
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/liveness-example/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/liveness-example/pom.xml
index 16e718a3be..725aa9cd3d 100644
--- a/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/liveness-example/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/liveness-example/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
liveness-example
liveness-example
@@ -19,12 +19,10 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-actuator
-
org.springframework.boot
spring-boot-starter-test
diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/readiness-example/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/readiness-example/pom.xml
index 0ee40b6504..65434259f2 100644
--- a/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/readiness-example/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-selfhealing/readiness-example/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
readiness-example
readiness-example
diff --git a/spring-cloud/spring-cloud-kubernetes/pom.xml b/spring-cloud/spring-cloud-kubernetes/pom.xml
index 7e494b61d9..1a3e3826d4 100644
--- a/spring-cloud/spring-cloud-kubernetes/pom.xml
+++ b/spring-cloud/spring-cloud-kubernetes/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-kubernetes
diff --git a/spring-cloud/spring-cloud-netflix-feign/pom.xml b/spring-cloud/spring-cloud-netflix-feign/pom.xml
index aa5ba5dbdb..6180ee7575 100644
--- a/spring-cloud/spring-cloud-netflix-feign/pom.xml
+++ b/spring-cloud/spring-cloud-netflix-feign/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.cloud
spring-cloud-netlix-feign
@@ -32,23 +33,19 @@
org.springframework.cloud
spring-cloud-starter-feign
-
com.netflix.feign
feign-okhttp
${feign-ok.version}
-
org.springframework.boot
spring-boot-starter-web
-
org.apache.httpcomponents
httpcore
-
org.springframework.boot
spring-boot-starter-test
@@ -59,13 +56,8 @@
Camden.SR7
8.18.0
-
-
+
+
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-open-service-broker/pom.xml b/spring-cloud/spring-cloud-open-service-broker/pom.xml
index 42e90402e5..ca55bc2147 100644
--- a/spring-cloud/spring-cloud-open-service-broker/pom.xml
+++ b/spring-cloud/spring-cloud-open-service-broker/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung
spring-cloud-open-service-broker
@@ -38,4 +38,4 @@
3.3.5.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-openfeign/pom.xml b/spring-cloud/spring-cloud-openfeign/pom.xml
index bdde46fe96..1cb618c7e1 100644
--- a/spring-cloud/spring-cloud-openfeign/pom.xml
+++ b/spring-cloud/spring-cloud-openfeign/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.cloud
spring-cloud-openfeign
@@ -32,29 +33,24 @@
org.springframework.cloud
spring-cloud-starter-openfeign
-
io.github.openfeign
feign-okhttp
-
org.springframework.boot
spring-boot-starter-web
-
io.github.openfeign.form
feign-form
3.8.0
-
io.github.openfeign.form
feign-form-spring
3.8.0
-
org.springframework.boot
spring-boot-starter-test
@@ -66,4 +62,4 @@
Hoxton.SR6
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-rest/pom.xml b/spring-cloud/spring-cloud-rest/pom.xml
index 1136fca020..8f0b7b8dcc 100644
--- a/spring-cloud/spring-cloud-rest/pom.xml
+++ b/spring-cloud/spring-cloud-rest/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-rest
@@ -48,4 +49,4 @@
1.8
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml
index 8ba0fc5cad..2fa003a634 100644
--- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml
+++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-books-api/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-rest-books-api
@@ -74,6 +75,4 @@
-
-
diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml
index c64341f652..9180283c2d 100644
--- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml
+++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-config-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-rest-config-server
@@ -52,7 +53,6 @@
Camden.SR4
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml
index 85790bf895..eb65395821 100644
--- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml
+++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-discovery-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-rest-discovery-server
@@ -60,7 +61,6 @@
Edgware.SR4
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml b/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml
index 35d0e79543..a8d5837320 100644
--- a/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml
+++ b/spring-cloud/spring-cloud-rest/spring-cloud-rest-reviews-api/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-rest-reviews-api
@@ -82,7 +83,6 @@
3.0.1
0.6
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-ribbon-client/pom.xml b/spring-cloud/spring-cloud-ribbon-client/pom.xml
index 2c9820d179..77c25b2f6b 100644
--- a/spring-cloud/spring-cloud-ribbon-client/pom.xml
+++ b/spring-cloud/spring-cloud-ribbon-client/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
spring-cloud-ribbon-client
0.0.1-SNAPSHOT
diff --git a/spring-cloud/spring-cloud-ribbon-retry/pom.xml b/spring-cloud/spring-cloud-ribbon-retry/pom.xml
index 99eb882421..e0075b4f41 100644
--- a/spring-cloud/spring-cloud-ribbon-retry/pom.xml
+++ b/spring-cloud/spring-cloud-ribbon-retry/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.spring.cloud
spring-cloud-ribbon-retry
@@ -55,6 +55,6 @@
Hoxton.SR3
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-ribbon-retry/ribbon-client-service/pom.xml b/spring-cloud/spring-cloud-ribbon-retry/ribbon-client-service/pom.xml
index ad47eb6c84..34d4d372bc 100644
--- a/spring-cloud/spring-cloud-ribbon-retry/ribbon-client-service/pom.xml
+++ b/spring-cloud/spring-cloud-ribbon-retry/ribbon-client-service/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
ribbon-client-service
diff --git a/spring-cloud/spring-cloud-ribbon-retry/ribbon-weather-service/pom.xml b/spring-cloud/spring-cloud-ribbon-retry/ribbon-weather-service/pom.xml
index f091341025..d3edb6062b 100644
--- a/spring-cloud/spring-cloud-ribbon-retry/ribbon-weather-service/pom.xml
+++ b/spring-cloud/spring-cloud-ribbon-retry/ribbon-weather-service/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
ribbon-weather-service
diff --git a/spring-cloud/spring-cloud-security/auth-client/pom.xml b/spring-cloud/spring-cloud-security/auth-client/pom.xml
index c7606719f9..cdbb056a45 100644
--- a/spring-cloud/spring-cloud-security/auth-client/pom.xml
+++ b/spring-cloud/spring-cloud-security/auth-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
auth-client
auth-client
@@ -82,4 +83,4 @@
4.3.1
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-security/auth-resource/pom.xml b/spring-cloud/spring-cloud-security/auth-resource/pom.xml
index d3f9eaf795..c999030c07 100644
--- a/spring-cloud/spring-cloud-security/auth-resource/pom.xml
+++ b/spring-cloud/spring-cloud-security/auth-resource/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
auth-resource
auth-resource
@@ -47,4 +48,4 @@
1.0.10.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-security/auth-server/pom.xml b/spring-cloud/spring-cloud-security/auth-server/pom.xml
index 59ddedf1b2..c0330aad43 100644
--- a/spring-cloud/spring-cloud-security/auth-server/pom.xml
+++ b/spring-cloud/spring-cloud-security/auth-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
auth-server
auth-server
diff --git a/spring-cloud/spring-cloud-security/pom.xml b/spring-cloud/spring-cloud-security/pom.xml
index 53b95380ed..0227989f99 100644
--- a/spring-cloud/spring-cloud-security/pom.xml
+++ b/spring-cloud/spring-cloud-security/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-security
1.0.0-SNAPSHOT
@@ -36,4 +37,4 @@
2020.0.1
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-sentinel/pom.xml b/spring-cloud/spring-cloud-sentinel/pom.xml
index 612cbcbfbe..a36dcc51bc 100644
--- a/spring-cloud/spring-cloud-sentinel/pom.xml
+++ b/spring-cloud/spring-cloud-sentinel/pom.xml
@@ -1,13 +1,13 @@
+ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4.0.0
spring-cloud-sentinel
spring-cloud-sentinel
http://maven.apache.org
pom
+
com.baeldung.spring.cloud
spring-cloud
@@ -39,4 +39,5 @@
UTF-8
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml b/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml
index c9a73b9aa1..9c8d4ac707 100644
--- a/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml
+++ b/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.twitterhdfs
twitterhdfs
@@ -12,7 +13,7 @@
org.springframework.boot
spring-boot-starter-parent
2.1.13.RELEASE
-
+
@@ -32,7 +33,7 @@
javax.servlet
jstl
-
+
org.springframework.boot
spring-boot-starter-test
test
diff --git a/spring-cloud/spring-cloud-stream/pom.xml b/spring-cloud/spring-cloud-stream/pom.xml
index 17c788c000..96a7ad012b 100644
--- a/spring-cloud/spring-cloud-stream/pom.xml
+++ b/spring-cloud/spring-cloud-stream/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung
spring-cloud-stream
@@ -40,4 +41,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml
index 32a31c3042..00e9e7c328 100644
--- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml
+++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kafka/pom.xml
@@ -1,6 +1,6 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-stream-kafka
spring-cloud-stream-kafka
@@ -27,41 +27,34 @@
-
org.springframework.cloud
spring-cloud-stream-binder-kafka
-
org.springframework.cloud
spring-cloud-stream-schema
-
org.springframework.cloud
spring-cloud-stream-test-support
test
-
io.confluent
kafka-avro-serializer
${kafka-avro-serializer.version}
-
org.apache.avro
avro-compiler
${avro.version}
-
org.apache.avro
avro-maven-plugin
${avro.version}
-
@@ -104,7 +97,6 @@
Greenwich.SR1
4.0.0
1.8.2
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml
index 9e706cc239..f542d78620 100644
--- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml
+++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-kinesis/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-stream-kinesis
spring-cloud-stream-kinesis
@@ -18,19 +18,16 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.cloud
spring-cloud-stream-binder-kinesis
${spring-cloud-stream-kinesis-binder.version}
-
com.amazonaws
aws-java-sdk-kinesis
${aws-sdk.version}
-
org.springframework.cloud
spring-cloud-stream-test-support
diff --git a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml
index 4aa42f03d7..6ca9e89031 100644
--- a/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml
+++ b/spring-cloud/spring-cloud-stream/spring-cloud-stream-rabbit/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-stream-rabbit
spring-cloud-stream-rabbit
@@ -19,7 +20,6 @@
org.springframework.cloud
spring-cloud-starter-stream-rabbit
-
org.springframework.cloud
spring-cloud-stream-test-support
@@ -27,4 +27,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-task/pom.xml b/spring-cloud/spring-cloud-task/pom.xml
index 21d8a4e42b..bf43799d2d 100644
--- a/spring-cloud/spring-cloud-task/pom.xml
+++ b/spring-cloud/spring-cloud-task/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-task
@@ -49,7 +50,6 @@
Hoxton.SR4
2.2.3.RELEASE
-
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-task/springcloudtaskbatch/pom.xml b/spring-cloud/spring-cloud-task/springcloudtaskbatch/pom.xml
index fd10322efb..7dbbb27a77 100644
--- a/spring-cloud/spring-cloud-task/springcloudtaskbatch/pom.xml
+++ b/spring-cloud/spring-cloud-task/springcloudtaskbatch/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
com.baeldung.cloud
springcloudtaskbatch
@@ -30,17 +30,14 @@
org.springframework.cloud
spring-cloud-starter-task
-
org.springframework.cloud
spring-cloud-task-core
-
org.springframework.boot
spring-boot-starter-batch
-
org.springframework.cloud
spring-cloud-task-batch
@@ -65,4 +62,4 @@
com.baeldung.TaskDemo
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml b/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml
index 33f6ccde74..ad7035ffe5 100644
--- a/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml
+++ b/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
springcloudtasksink
springcloudtasksink
@@ -32,7 +33,6 @@
spring-boot-starter-test
test
-
org.springframework.cloud
spring-cloud-deployer-local
@@ -53,4 +53,4 @@
2.3.1.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-vault/pom.xml b/spring-cloud/spring-cloud-vault/pom.xml
index d9ae6b515f..131d58c967 100644
--- a/spring-cloud/spring-cloud-vault/pom.xml
+++ b/spring-cloud/spring-cloud-vault/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-vault
@@ -28,28 +29,23 @@
-
org.springframework.cloud
spring-cloud-starter-vault-config
-
org.springframework.cloud
spring-cloud-vault-config-databases
-
org.springframework.boot
spring-boot-starter-test
test
-
mysql
mysql-connector-java
-
org.springframework.boot
spring-boot-starter-jdbc
@@ -85,4 +81,4 @@
Greenwich.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml b/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml
index 24e783ff30..8e7b87c220 100644
--- a/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml
+++ b/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
Greeting
Greeting
@@ -79,4 +80,4 @@
1.3
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zookeeper/HelloWorld/pom.xml b/spring-cloud/spring-cloud-zookeeper/HelloWorld/pom.xml
index 777b857403..57a1cc029c 100644
--- a/spring-cloud/spring-cloud-zookeeper/HelloWorld/pom.xml
+++ b/spring-cloud/spring-cloud-zookeeper/HelloWorld/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
HelloWorld
HelloWorld
diff --git a/spring-cloud/spring-cloud-zookeeper/pom.xml b/spring-cloud/spring-cloud-zookeeper/pom.xml
index 31bf043ac0..79eabf74f0 100644
--- a/spring-cloud/spring-cloud-zookeeper/pom.xml
+++ b/spring-cloud/spring-cloud-zookeeper/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-zookeeper
spring-cloud-zookeeper
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml
index 321da7527a..9989893f2f 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
eureka-client
1.0.0-SNAPSHOT
@@ -38,4 +39,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-server/pom.xml
index 08854b02fd..34f82a7347 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-server/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/eureka-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
eureka-server
1.0.0-SNAPSHOT
@@ -39,4 +40,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/pom.xml
index c6658d70a2..81a4b9202c 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cloud-zuul-eureka-integration
1.0.0-SNAPSHOT
@@ -26,5 +27,5 @@
1.4.2.RELEASE
1.10
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/zuul-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/zuul-server/pom.xml
index 2a899760dd..37fe4815bb 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/zuul-server/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/zuul-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
zuul-server
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml
index 77e8ef7c20..3514924198 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
eureka-client
1.0.0-SNAPSHOT
@@ -37,7 +38,6 @@
spring-boot-starter-web
${spring-boot.version}
-
org.springframework.boot
spring-boot-starter-test
@@ -46,4 +46,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml
index c3f6642351..dcd912df07 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/eureka-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
eureka-server
1.0.0-SNAPSHOT
@@ -37,7 +38,6 @@
commons-configuration
${commons-config.version}
-
org.springframework.boot
spring-boot-starter-test
@@ -46,4 +46,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml
index 996110f875..89d0d2c942 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-zuul-eureka-integration
1.0.0-SNAPSHOT
@@ -30,4 +30,4 @@
Finchley.SR2
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml
index ddffe540c5..bb38ec1351 100644
--- a/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-eureka-integration/zuul-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
zuul-server
zuul-server
@@ -46,7 +47,6 @@
rxjava
${rxjava.version}
-
org.springframework.boot
spring-boot-starter-test
diff --git a/spring-cloud/spring-cloud-zuul-fallback/api-gateway/pom.xml b/spring-cloud/spring-cloud-zuul-fallback/api-gateway/pom.xml
index 4e092736a5..cfee3ce656 100644
--- a/spring-cloud/spring-cloud-zuul-fallback/api-gateway/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-fallback/api-gateway/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
api-gateway
api-gateway
@@ -50,4 +50,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-fallback/pom.xml b/spring-cloud/spring-cloud-zuul-fallback/pom.xml
index 42925a6ab9..1c426503e5 100644
--- a/spring-cloud/spring-cloud-zuul-fallback/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-fallback/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-cloud-zuul-fallback
spring-cloud-zuul-fallback
@@ -24,5 +24,5 @@
Finchley.SR2
3.1.1
-
-
+
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul-fallback/weather-service/pom.xml b/spring-cloud/spring-cloud-zuul-fallback/weather-service/pom.xml
index e66110fb23..239be5e134 100644
--- a/spring-cloud/spring-cloud-zuul-fallback/weather-service/pom.xml
+++ b/spring-cloud/spring-cloud-zuul-fallback/weather-service/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
weather-service
weather-service
@@ -31,13 +31,12 @@
-
+
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-test
@@ -45,4 +44,4 @@
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul/pom.xml b/spring-cloud/spring-cloud-zuul/pom.xml
index 13834848fe..fc3a127e90 100644
--- a/spring-cloud/spring-cloud-zuul/pom.xml
+++ b/spring-cloud/spring-cloud-zuul/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.cloud
spring-cloud-zuul
@@ -84,4 +85,4 @@
2.2.2.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-foos-resource/pom.xml b/spring-cloud/spring-cloud-zuul/spring-zuul-foos-resource/pom.xml
index f5a8c3b613..7a5f9f602b 100644
--- a/spring-cloud/spring-cloud-zuul/spring-zuul-foos-resource/pom.xml
+++ b/spring-cloud/spring-cloud-zuul/spring-zuul-foos-resource/pom.xml
@@ -1,5 +1,6 @@
-
+
4.0.0
spring-zuul-foos-resource
spring-zuul-foos-resource
diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml
index 0ca9f0d050..851ad0fd8f 100644
--- a/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml
+++ b/spring-cloud/spring-cloud-zuul/spring-zuul-post-filter/pom.xml
@@ -1,15 +1,15 @@
-
+ 4.0.0
+ spring-zuul-post-filter
+
spring-cloud-zuul
com.baeldung.spring.cloud
0.0.1-SNAPSHOT
- 4.0.0
- spring-zuul-post-filter
diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-rate-limiting/pom.xml b/spring-cloud/spring-cloud-zuul/spring-zuul-rate-limiting/pom.xml
index bb735a71ed..e09fcd3711 100644
--- a/spring-cloud/spring-cloud-zuul/spring-zuul-rate-limiting/pom.xml
+++ b/spring-cloud/spring-cloud-zuul/spring-zuul-rate-limiting/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-zuul-rate-limiting
0.0.1-SNAPSHOT
@@ -43,4 +44,4 @@
2.2.0.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-cloud/spring-cloud-zuul/spring-zuul-ui/pom.xml b/spring-cloud/spring-cloud-zuul/spring-zuul-ui/pom.xml
index b7e1702558..7c3f668473 100644
--- a/spring-cloud/spring-cloud-zuul/spring-zuul-ui/pom.xml
+++ b/spring-cloud/spring-cloud-zuul/spring-zuul-ui/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-zuul-ui
spring-zuul-ui
@@ -47,5 +48,5 @@
-
+
\ No newline at end of file
diff --git a/spring-core-2/pom.xml b/spring-core-2/pom.xml
index 3f8e84e13d..de5c7c0d4d 100644
--- a/spring-core-2/pom.xml
+++ b/spring-core-2/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-core-2
0.1-SNAPSHOT
@@ -143,7 +144,6 @@
mockito-core
test
-
net.javacrumbs.shedlock
@@ -202,7 +202,6 @@
1.3.2
5.2.5.Final
-
25.1-jre
3.6
@@ -212,4 +211,4 @@
3.2.2
-
+
\ No newline at end of file
diff --git a/spring-core-3/pom.xml b/spring-core-3/pom.xml
index 618800529c..50d2e7ac5e 100644
--- a/spring-core-3/pom.xml
+++ b/spring-core-3/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-core-3
spring-core-3
diff --git a/spring-core-4/pom.xml b/spring-core-4/pom.xml
index d2e948c475..5706b2ee75 100644
--- a/spring-core-4/pom.xml
+++ b/spring-core-4/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-core-4
spring-core-4
@@ -84,7 +84,6 @@
javax.servlet-api
4.0.0
-
@@ -95,4 +94,4 @@
2.9.1
-
+
\ No newline at end of file
diff --git a/spring-core-5/pom.xml b/spring-core-5/pom.xml
index 05ee1c5f5d..68229b80b8 100644
--- a/spring-core-5/pom.xml
+++ b/spring-core-5/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-core-5
spring-core-5
@@ -37,4 +37,4 @@
2.4.2
-
+
\ No newline at end of file
diff --git a/spring-core/pom.xml b/spring-core/pom.xml
index 7d83fc198c..ab41670224 100644
--- a/spring-core/pom.xml
+++ b/spring-core/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-core
0.0.1-SNAPSHOT
diff --git a/spring-cucumber/pom.xml b/spring-cucumber/pom.xml
index a945797ee1..c6c163d7d1 100644
--- a/spring-cucumber/pom.xml
+++ b/spring-cucumber/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-cucumber
0.0.1-SNAPSHOT
@@ -57,4 +58,4 @@
1.3.2
-
+
\ No newline at end of file
diff --git a/spring-data-rest-querydsl/pom.xml b/spring-data-rest-querydsl/pom.xml
index 5e47f4979e..0b1cdd8928 100644
--- a/spring-data-rest-querydsl/pom.xml
+++ b/spring-data-rest-querydsl/pom.xml
@@ -1,7 +1,7 @@
+ xmlns="http://maven.apache.org/POM/4.0.0"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-data-rest-querydsl
1.0
@@ -99,10 +99,11 @@
+
1.8
1.8
1.1.3
-
+
\ No newline at end of file
diff --git a/spring-data-rest/pom.xml b/spring-data-rest/pom.xml
index bfbd66a280..4a22ce92d1 100644
--- a/spring-data-rest/pom.xml
+++ b/spring-data-rest/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-data-rest
1.0
diff --git a/spring-di-2/pom.xml b/spring-di-2/pom.xml
index 4dd92ca18c..7d3f4c7b33 100644
--- a/spring-di-2/pom.xml
+++ b/spring-di-2/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-di-2
1.0-SNAPSHOT
@@ -78,4 +78,5 @@
1.11
1
+
\ No newline at end of file
diff --git a/spring-di/pom.xml b/spring-di/pom.xml
index df0b685ae2..cbd49242e4 100644
--- a/spring-di/pom.xml
+++ b/spring-di/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-di
1.0-SNAPSHOT
@@ -90,26 +90,22 @@
aspectjweaver
${aspectjweaver.version}
-
-
-
-
-
-
+
+
+
+
javax.annotation
javax.annotation-api
${annotation-api.version}
-
-
-
-
-
-
-
-
+
+
+
+
+
+
@@ -155,7 +151,6 @@
5.0.6.RELEASE
1.3.2
-
1.4.4.RELEASE
1
20.0
diff --git a/spring-drools/pom.xml b/spring-drools/pom.xml
index 8b105158ec..b8c025893c 100644
--- a/spring-drools/pom.xml
+++ b/spring-drools/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-drools
1.0.0-SNAPSHOT
@@ -14,7 +15,6 @@
-
org.kie
kie-ci
@@ -77,4 +77,5 @@
7.0.0.Final
+
\ No newline at end of file
diff --git a/spring-ejb/ejb-beans/pom.xml b/spring-ejb/ejb-beans/pom.xml
index 8f2bf31ee4..cdc28ef5d7 100644
--- a/spring-ejb/ejb-beans/pom.xml
+++ b/spring-ejb/ejb-beans/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.singletonsession
ejb-beans
@@ -41,7 +42,7 @@
spring-context
${springframework.version}
-
+
javax.ejb
javax.ejb-api
@@ -188,4 +189,4 @@
8.2.1.Final
-
+
\ No newline at end of file
diff --git a/spring-ejb/pom.xml b/spring-ejb/pom.xml
index 1b3a52184e..383cde1e69 100755
--- a/spring-ejb/pom.xml
+++ b/spring-ejb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring.ejb
spring-ejb
@@ -16,22 +17,12 @@
../
-
-
- jboss-public-repository-group
- JBoss Public Maven Repository Group
- http://repository.jboss.org/nexus/content/groups/public/
- default
-
- true
- never
-
-
- true
- never
-
-
-
+
+ spring-ejb-remote
+ ejb-beans
+ spring-ejb-client
+ wildfly
+
@@ -57,6 +48,23 @@
+
+
+ jboss-public-repository-group
+ JBoss Public Maven Repository Group
+ http://repository.jboss.org/nexus/content/groups/public/
+ default
+
+ true
+ never
+
+
+ true
+ never
+
+
+
+
@@ -71,13 +79,6 @@
-
- spring-ejb-remote
- ejb-beans
- spring-ejb-client
- wildfly
-
-
1.0.0-SNAPSHOT
8.0
@@ -86,4 +87,4 @@
3.2
-
+
\ No newline at end of file
diff --git a/spring-ejb/spring-ejb-client/pom.xml b/spring-ejb/spring-ejb-client/pom.xml
index 6c335e8982..ecf9d0eb49 100644
--- a/spring-ejb/spring-ejb-client/pom.xml
+++ b/spring-ejb/spring-ejb-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-ejb-client
spring-ejb-client
@@ -30,30 +31,25 @@
org.springframework.boot
spring-boot-starter-web
-
org.wildfly
wildfly-ejb-client-bom
pom
-
com.baeldung.spring.ejb
spring-ejb-remote
ejb
-
org.springframework.boot
spring-boot-starter-test
test
-
io.undertow
undertow-servlet
-
@@ -70,4 +66,4 @@
2.0.4.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-ejb/spring-ejb-remote/pom.xml b/spring-ejb/spring-ejb-remote/pom.xml
index 28d5398b97..b7bf2aa79b 100644
--- a/spring-ejb/spring-ejb-remote/pom.xml
+++ b/spring-ejb/spring-ejb-remote/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
spring-ejb-remote
spring-ejb-remote
@@ -40,16 +40,13 @@
org.codehaus.cargo
cargo-maven2-plugin
${cargo-maven2-plugin.version}
-
-
wildfly10x
https://download.jboss.org/wildfly/12.0.0.Final/wildfly-12.0.0.Final.zip
-
127.0.0.1
@@ -58,13 +55,11 @@
testUser:admin1234!
-
-
wildfly-runtime
diff --git a/spring-ejb/wildfly/pom.xml b/spring-ejb/wildfly/pom.xml
index fdf2517139..ae90f71b7c 100644
--- a/spring-ejb/wildfly/pom.xml
+++ b/spring-ejb/wildfly/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.wildfly
wildfly
diff --git a/spring-ejb/wildfly/widlfly-web/pom.xml b/spring-ejb/wildfly/widlfly-web/pom.xml
index 79d0dca470..fb8a7678af 100644
--- a/spring-ejb/wildfly/widlfly-web/pom.xml
+++ b/spring-ejb/wildfly/widlfly-web/pom.xml
@@ -1,11 +1,12 @@
-
4.0.0
widlfly-web
- widlfly-web
+ widlfly-web
war
-
+
com.baeldung.wildfly
wildfly
diff --git a/spring-ejb/wildfly/wildfly-ear/pom.xml b/spring-ejb/wildfly/wildfly-ear/pom.xml
index 07f53358bf..da321cb9eb 100644
--- a/spring-ejb/wildfly/wildfly-ear/pom.xml
+++ b/spring-ejb/wildfly/wildfly-ear/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
wildfly-ear
wildfly-ear
diff --git a/spring-ejb/wildfly/wildfly-ejb-interfaces/pom.xml b/spring-ejb/wildfly/wildfly-ejb-interfaces/pom.xml
index 21fc26106a..bc9159b667 100644
--- a/spring-ejb/wildfly/wildfly-ejb-interfaces/pom.xml
+++ b/spring-ejb/wildfly/wildfly-ejb-interfaces/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
wildfly-ejb-interfaces
wildfly-ejb-interfaces
diff --git a/spring-ejb/wildfly/wildfly-ejb/pom.xml b/spring-ejb/wildfly/wildfly-ejb/pom.xml
index c35e340ac9..36574bf984 100644
--- a/spring-ejb/wildfly/wildfly-ejb/pom.xml
+++ b/spring-ejb/wildfly/wildfly-ejb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
wildfly-ejb
wildfly-ejb
diff --git a/spring-ejb/wildfly/wildfly-jpa/pom.xml b/spring-ejb/wildfly/wildfly-jpa/pom.xml
index 1bc618a296..603e337510 100644
--- a/spring-ejb/wildfly/wildfly-jpa/pom.xml
+++ b/spring-ejb/wildfly/wildfly-jpa/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
wildfly-jpa
wildfly-jpa
diff --git a/spring-ejb/wildfly/wildfly-mdb/pom.xml b/spring-ejb/wildfly/wildfly-mdb/pom.xml
index 109cff861b..0784725cde 100644
--- a/spring-ejb/wildfly/wildfly-mdb/pom.xml
+++ b/spring-ejb/wildfly/wildfly-mdb/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
wildfly-mdb
wildfly-mdb
diff --git a/spring-exceptions/pom.xml b/spring-exceptions/pom.xml
index 29ed7d5caa..337597a741 100644
--- a/spring-exceptions/pom.xml
+++ b/spring-exceptions/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-exceptions
0.1-SNAPSHOT
@@ -14,9 +15,7 @@
-
-
org.springframework
spring-web
@@ -49,9 +48,7 @@
spring-context
${org.springframework.version}
-
-
org.hibernate
hibernate-core
@@ -73,33 +70,26 @@
tomcat-dbcp
${tomcat-dbcp.version}
-
-
org.hibernate
hibernate-validator
${hibernate-validator.version}
-
-
javax.servlet
javax.servlet-api
${javax.servlet-api.version}
provided
-
javax.servlet
jstl
${jstl.version}
runtime
-
-
com.google.guava
guava
@@ -111,22 +101,18 @@
${commons-lang3.version}
test
-
-
org.springframework
spring-test
${org.springframework.version}
test
-
javax.el
el-api
${javax.el.version}
-
org.apache.derby
derby
@@ -157,9 +143,7 @@
true
-
-
org.apache.maven.plugins
maven-war-plugin
@@ -168,40 +152,30 @@
false
-
-
-
4.3.4.RELEASE
4.2.0.RELEASE
3.21.0-GA
-
5.2.5.Final
5.1.40
7.0.73
10.13.1.1
-
5.3.3.Final
2.2
-
19.0
-
4.4.5
4.5.2
-
2.9.0
-
2.7
1.6.1
-
\ No newline at end of file
diff --git a/spring-freemarker/pom.xml b/spring-freemarker/pom.xml
index bdf7e97bce..07d37736b6 100644
--- a/spring-freemarker/pom.xml
+++ b/spring-freemarker/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.freemarker
spring-freemarker
@@ -61,4 +62,4 @@
1.5.10.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-integration/pom.xml b/spring-integration/pom.xml
index f46445a39f..f5aaa93ff7 100644
--- a/spring-integration/pom.xml
+++ b/spring-integration/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.samples.spring.integration
spring-integration
@@ -16,7 +17,6 @@
-
org.springframework.integration
@@ -74,14 +74,12 @@
spring-integration-jdbc
${spring.version}
-
org.springframework.security
spring-security-test
${spring.version}
test
-
com.h2database
h2
@@ -124,4 +122,4 @@
1.4.197
-
+
\ No newline at end of file
diff --git a/spring-jenkins-pipeline/pom.xml b/spring-jenkins-pipeline/pom.xml
index 152e107409..f2fd4191fd 100644
--- a/spring-jenkins-pipeline/pom.xml
+++ b/spring-jenkins-pipeline/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-jenkins-pipeline
0.0.1-SNAPSHOT
@@ -83,4 +84,4 @@
2.0.0
-
+
\ No newline at end of file
diff --git a/spring-jersey/pom.xml b/spring-jersey/pom.xml
index 50d377b73f..08c19f1d3b 100644
--- a/spring-jersey/pom.xml
+++ b/spring-jersey/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-jersey
0.1-SNAPSHOT
@@ -14,9 +15,7 @@
-
-
org.glassfish.jersey.containers
jersey-container-servlet
@@ -32,7 +31,6 @@
jersey-client
${jersey.version}
-
javax.servlet
@@ -40,7 +38,6 @@
${javax.servlet-api.version}
provided
-
org.glassfish.jersey.ext
@@ -53,9 +50,7 @@
-
-
org.apache.httpcomponents
httpclient
@@ -68,14 +63,12 @@
-
org.apache.httpcomponents
httpcore
${httpcore.version}
test
-
org.glassfish.jersey.inject
jersey-hk2
@@ -118,7 +111,6 @@
${assertj-core.version}
test
-
org.springframework.boot
@@ -126,7 +118,6 @@
${spring-boot.version}
test
-
@@ -199,7 +190,6 @@
false
-
org.codehaus.cargo
cargo-maven2-plugin
@@ -231,4 +221,4 @@
1.5.10.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-jinq/pom.xml b/spring-jinq/pom.xml
index 1f5d8cd915..14ac366e74 100644
--- a/spring-jinq/pom.xml
+++ b/spring-jinq/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-jinq
0.1-SNAPSHOT
@@ -20,24 +21,20 @@
jinq-jpa
${jinq.version}
-
com.h2database
h2
-
org.springframework.boot
spring-boot-starter-data-jpa
-
org.springframework
spring-orm
-
org.springframework.boot
@@ -64,4 +61,4 @@
1.8.29
-
+
\ No newline at end of file
diff --git a/spring-jms/pom.xml b/spring-jms/pom.xml
index 9cd9126fac..09bf854221 100644
--- a/spring-jms/pom.xml
+++ b/spring-jms/pom.xml
@@ -1,5 +1,6 @@
-
4.0.0
spring-jms
@@ -33,14 +34,13 @@
activemq-all
${activemq.version}
-
- org.springframework.boot
- spring-boot-starter-test
- ${spring-boot-test.version}
- test
-
+ org.springframework.boot
+ spring-boot-starter-test
+ ${spring-boot-test.version}
+ test
+
@@ -67,4 +67,4 @@
1.5.10.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-katharsis/pom.xml b/spring-katharsis/pom.xml
index 674d9a2a14..b836a42bca 100644
--- a/spring-katharsis/pom.xml
+++ b/spring-katharsis/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
org.springframework.samples
spring-katharsis
@@ -20,19 +21,15 @@
org.springframework.boot
spring-boot-starter-web
-
org.springframework.boot
spring-boot-starter-data-jpa
-
com.h2database
h2
-
-
io.katharsis
katharsis-spring
@@ -140,4 +137,4 @@
1.6.1
-
+
\ No newline at end of file
diff --git a/spring-mobile/pom.xml b/spring-mobile/pom.xml
index 465458ba49..1593de27a8 100644
--- a/spring-mobile/pom.xml
+++ b/spring-mobile/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-mobile
1.0-SNAPSHOT
@@ -30,17 +31,9 @@
spring-boot-starter-freemarker
-
-
- spring-milestones
- Spring Milestones
- https://repo.spring.io/libs-milestone
-
- false
-
-
-
+
- 2.0.0.M3
+ 1.1.5.RELEASE
-
+
+
\ No newline at end of file
diff --git a/spring-mockito/pom.xml b/spring-mockito/pom.xml
index 5d2cd7c445..0753935d0c 100644
--- a/spring-mockito/pom.xml
+++ b/spring-mockito/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-mockito
0.0.1-SNAPSHOT
@@ -31,4 +32,4 @@
2.24.0
-
+
\ No newline at end of file
diff --git a/spring-protobuf/pom.xml b/spring-protobuf/pom.xml
index f43faef0d1..44a83803bd 100644
--- a/spring-protobuf/pom.xml
+++ b/spring-protobuf/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-protobuf
0.1-SNAPSHOT
@@ -24,12 +25,10 @@
protobuf-java-format
${protobuf-java-format.version}
-
org.springframework.boot
spring-boot-starter-web
-
org.apache.httpcomponents
httpclient
@@ -42,4 +41,4 @@
com.baeldung.protobuf.Application
-
+
\ No newline at end of file
diff --git a/spring-quartz/pom.xml b/spring-quartz/pom.xml
index 283d1a1734..19ea302a1d 100644
--- a/spring-quartz/pom.xml
+++ b/spring-quartz/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-quartz
spring-quartz
diff --git a/spring-reactor/pom.xml b/spring-reactor/pom.xml
index 0115826fd6..c64d449553 100644
--- a/spring-reactor/pom.xml
+++ b/spring-reactor/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-reactor
1.0-SNAPSHOT
@@ -41,4 +42,4 @@
2.0.8.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-remoting/pom.xml b/spring-remoting/pom.xml
index 59cb9f863e..ba76b56dbd 100644
--- a/spring-remoting/pom.xml
+++ b/spring-remoting/pom.xml
@@ -1,13 +1,15 @@
-
+
4.0.0
spring-remoting
1.0-SNAPSHOT
spring-remoting
pom
Parent for all projects related to Spring Remoting, except remoting-hessian-burlap
-
+
com.baeldung
@@ -16,6 +18,14 @@
../parent-boot-2
+
+ remoting-hessian-burlap
+ remoting-http
+ remoting-amqp
+ remoting-jms
+ remoting-rmi
+
+
@@ -27,12 +37,4 @@
-
- remoting-hessian-burlap
- remoting-http
- remoting-amqp
- remoting-jms
- remoting-rmi
-
-
\ No newline at end of file
diff --git a/spring-remoting/remoting-amqp/pom.xml b/spring-remoting/remoting-amqp/pom.xml
index ea0b605980..8ce70f86c2 100644
--- a/spring-remoting/remoting-amqp/pom.xml
+++ b/spring-remoting/remoting-amqp/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
remoting-amqp
remoting-amqp
@@ -17,4 +18,4 @@
remoting-amqp-client
-
+
\ No newline at end of file
diff --git a/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml b/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml
index 17c5b31e62..1bcab004f1 100644
--- a/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml
+++ b/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
remoting-amqp-client
remoting-amqp-client
@@ -31,4 +32,4 @@
-
+
\ No newline at end of file
diff --git a/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml b/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml
index 13d0c0a6da..6b6c12b41a 100644
--- a/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml
+++ b/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
remoting-amqp-server
remoting-amqp-server
@@ -34,4 +35,4 @@
1.0-SNAPSHOT
-
+
\ No newline at end of file
diff --git a/spring-remoting/remoting-hessian-burlap/pom.xml b/spring-remoting/remoting-hessian-burlap/pom.xml
index 67e3e3eab4..e5975b9f37 100644
--- a/spring-remoting/remoting-hessian-burlap/pom.xml
+++ b/spring-remoting/remoting-hessian-burlap/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-hessian-burlap
1.0-SNAPSHOT
@@ -9,7 +9,7 @@
pom
-
+
com.baeldung
parent-boot-1
0.0.1-SNAPSHOT
diff --git a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml
index 20680d5880..63458ef278 100644
--- a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml
+++ b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-client/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-hessian-burlap-client
remoting-hessian-burlap-client
@@ -33,7 +33,6 @@
hessian
${hessian.version}
-
${project.groupId}
@@ -58,6 +57,7 @@
+
4.0.38
diff --git a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml
index 6e4f2e81e4..d64e8c94c1 100644
--- a/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml
+++ b/spring-remoting/remoting-hessian-burlap/remoting-hessian-burlap-server/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-hessian-burlap-server
remoting-hessian-burlap-server
diff --git a/spring-remoting/remoting-http/pom.xml b/spring-remoting/remoting-http/pom.xml
index 2e5195a909..22627c638c 100644
--- a/spring-remoting/remoting-http/pom.xml
+++ b/spring-remoting/remoting-http/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-http
remoting-http
diff --git a/spring-remoting/remoting-http/remoting-http-api/pom.xml b/spring-remoting/remoting-http/remoting-http-api/pom.xml
index 697c3f44e5..1f088a9ac1 100644
--- a/spring-remoting/remoting-http/remoting-http-api/pom.xml
+++ b/spring-remoting/remoting-http/remoting-http-api/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-http-api
remoting-http-api
diff --git a/spring-remoting/remoting-http/remoting-http-client/pom.xml b/spring-remoting/remoting-http/remoting-http-client/pom.xml
index 03de2d3e4d..909db5f902 100644
--- a/spring-remoting/remoting-http/remoting-http-client/pom.xml
+++ b/spring-remoting/remoting-http/remoting-http-client/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-http-client
remoting-http-client
diff --git a/spring-remoting/remoting-http/remoting-http-server/pom.xml b/spring-remoting/remoting-http/remoting-http-server/pom.xml
index 872688e683..be304b9e92 100644
--- a/spring-remoting/remoting-http/remoting-http-server/pom.xml
+++ b/spring-remoting/remoting-http/remoting-http-server/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-http-server
remoting-http-server
diff --git a/spring-remoting/remoting-jms/pom.xml b/spring-remoting/remoting-jms/pom.xml
index 33299cd2c5..61bd1d4cfd 100644
--- a/spring-remoting/remoting-jms/pom.xml
+++ b/spring-remoting/remoting-jms/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-jms
remoting-jms
diff --git a/spring-remoting/remoting-jms/remoting-jms-client/pom.xml b/spring-remoting/remoting-jms/remoting-jms-client/pom.xml
index 2f3f993b2e..9e8f230e26 100644
--- a/spring-remoting/remoting-jms/remoting-jms-client/pom.xml
+++ b/spring-remoting/remoting-jms/remoting-jms-client/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-jms-client
remoting-jms-client
diff --git a/spring-remoting/remoting-jms/remoting-jms-server/pom.xml b/spring-remoting/remoting-jms/remoting-jms-server/pom.xml
index 53d95edcd7..ae105627a0 100644
--- a/spring-remoting/remoting-jms/remoting-jms-server/pom.xml
+++ b/spring-remoting/remoting-jms/remoting-jms-server/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-jms-server
remoting-jms-server
diff --git a/spring-remoting/remoting-rmi/pom.xml b/spring-remoting/remoting-rmi/pom.xml
index 037e73658e..ee65c799a4 100644
--- a/spring-remoting/remoting-rmi/pom.xml
+++ b/spring-remoting/remoting-rmi/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-rmi
remoting-rmi
diff --git a/spring-remoting/remoting-rmi/remoting-rmi-client/pom.xml b/spring-remoting/remoting-rmi/remoting-rmi-client/pom.xml
index 5d8d82d6ab..91630a88e9 100644
--- a/spring-remoting/remoting-rmi/remoting-rmi-client/pom.xml
+++ b/spring-remoting/remoting-rmi/remoting-rmi-client/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-rmi-client
remoting-rmi-client
diff --git a/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml b/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml
index cb5eaa1031..ecf57018ec 100644
--- a/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml
+++ b/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml
@@ -1,7 +1,7 @@
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
remoting-rmi-server
remoting-rmi-server
diff --git a/spring-roo/pom.xml b/spring-roo/pom.xml
index a3680ade70..d1cf3e6412 100644
--- a/spring-roo/pom.xml
+++ b/spring-roo/pom.xml
@@ -1,7 +1,9 @@
-
-
+
+
4.0.0
com.baeldung
spring-roo
@@ -13,7 +15,7 @@
io.spring.platform
platform-bom
Athens-RELEASE
-
+
@@ -27,40 +29,33 @@
spring-boot-starter-test
test
-
org.springframework.boot
spring-boot-devtools
true
-
org.springframework.roo
org.springframework.roo.annotations
pom
-
org.aspectj
aspectjrt
-
org.apache.commons
commons-lang3
-
org.assertj
assertj-core
-
-
org.springframework.boot
spring-boot-starter-data-jpa
@@ -367,7 +362,6 @@
-
org.springframework.boot
@@ -397,18 +391,6 @@
-
-
- maven-snapshot-repository
- Maven Snapshot Repository
- https://oss.sonatype.org/content/repositories/snapshots
-
- false
-
-
- true
-
-
spring-roo-repository
@@ -427,7 +409,6 @@
pom
provided
-
io.springlets
springlets-data-jpa
@@ -640,4 +621,4 @@
2.0.0.RELEASE
-
+
\ No newline at end of file
diff --git a/spring-scheduling/pom.xml b/spring-scheduling/pom.xml
index b27f33196d..8df35c4844 100644
--- a/spring-scheduling/pom.xml
+++ b/spring-scheduling/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
spring-scheduling
0.1-SNAPSHOT
diff --git a/spring-web-modules/spring-resttemplate-3/src/test/java/com/baeldung/largefile/LargeFileDownloadIntegrationTest.java b/spring-web-modules/spring-resttemplate-3/src/test/java/com/baeldung/largefile/LargeFileDownloadIntegrationTest.java
index d8fc58319f..687203d21a 100644
--- a/spring-web-modules/spring-resttemplate-3/src/test/java/com/baeldung/largefile/LargeFileDownloadIntegrationTest.java
+++ b/spring-web-modules/spring-resttemplate-3/src/test/java/com/baeldung/largefile/LargeFileDownloadIntegrationTest.java
@@ -14,7 +14,7 @@ import org.springframework.web.client.RestTemplate;
public class LargeFileDownloadIntegrationTest {
- static String FILE_URL = "http://ovh.net/files/1Mio.dat";
+ static String FILE_URL = "https://s3.amazonaws.com/baeldung.com/Do+JSON+with+Jackson+by+Baeldung.pdf";
RestTemplate restTemplate;
diff --git a/spring-webflux-threads/pom.xml b/spring-webflux-threads/pom.xml
index 15224fcd14..bc5050b660 100644
--- a/spring-webflux-threads/pom.xml
+++ b/spring-webflux-threads/pom.xml
@@ -1,6 +1,7 @@
-
+
4.0.0
com.baeldung.spring
spring-webflux-threads
@@ -21,33 +22,16 @@
org.springframework.boot
spring-boot-starter-webflux
-
+
-
+
-
+
io.reactivex.rxjava2
rxjava
@@ -87,4 +71,4 @@
-
+
\ No newline at end of file
diff --git a/testing-modules/testing-libraries-2/pom.xml b/testing-modules/testing-libraries-2/pom.xml
index 7f96280cac..b01a1a918b 100644
--- a/testing-modules/testing-libraries-2/pom.xml
+++ b/testing-modules/testing-libraries-2/pom.xml
@@ -12,6 +12,15 @@
../
+
+ 0.8.6
+ 1.19.0
+ 1.0.0
+ 1.1.0
+ 5.6.2
+ 3.16.1
+
+
org.assertj
@@ -72,6 +81,36 @@
+
+
+ maven-war-plugin
+ 2.4
+
+ false
+
+
+
+
+ org.jacoco
+ jacoco-maven-plugin
+ ${jacoco.version}
+
+
+ jacoco-initialize
+
+ prepare-agent
+
+
+
+ jacoco-site
+ package
+
+ report
+
+
+
+
+
testing-libraries
@@ -81,11 +120,5 @@
-
- 1.19.0
- 1.0.0
- 1.1.0
- 5.6.2
- 3.16.1
-
+
diff --git a/testing-modules/testing-libraries-2/src/main/java/com/baeldung/sonarqubeandjacoco/product/Product.java b/testing-modules/testing-libraries-2/src/main/java/com/baeldung/sonarqubeandjacoco/product/Product.java
new file mode 100644
index 0000000000..42f103a317
--- /dev/null
+++ b/testing-modules/testing-libraries-2/src/main/java/com/baeldung/sonarqubeandjacoco/product/Product.java
@@ -0,0 +1,54 @@
+package com.baeldung.sonarqubeandjacoco.product;
+
+public class Product {
+
+ private int id;
+ private String name;
+ private int units;
+ private double price;
+
+ public Product() {
+ super();
+ }
+
+ public Product(int id, String name, int units, double price) {
+ super();
+ this.id = id;
+ this.name = name;
+ this.units = units;
+ this.price = price;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public void setId(int id) {
+ this.id = id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public int getUnits() {
+ return units;
+ }
+
+ public void setUnits(int units) {
+ this.units = units;
+ }
+
+ public double getPrice() {
+ return price;
+ }
+
+ public void setPrice(double price) {
+ this.price = price;
+ }
+
+}
\ No newline at end of file
diff --git a/testing-modules/testing-libraries-2/src/test/java/com/baeldung/sonarqubeandjacoco/product/ProductUnitTest.java b/testing-modules/testing-libraries-2/src/test/java/com/baeldung/sonarqubeandjacoco/product/ProductUnitTest.java
new file mode 100644
index 0000000000..da649851e0
--- /dev/null
+++ b/testing-modules/testing-libraries-2/src/test/java/com/baeldung/sonarqubeandjacoco/product/ProductUnitTest.java
@@ -0,0 +1,26 @@
+package com.baeldung.sonarqubeandjacoco.product;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import org.junit.Test;
+
+import com.baeldung.sonarqubeandjacoco.product.Product;
+
+public class ProductUnitTest {
+
+ @Test
+ public void test() {
+ Product product = new Product();
+ product.setId(1);
+ assertNull(product.getName());
+ assert (product.getId() == 1);
+ }
+
+ @Test
+ public void testProduct() {
+ Product product = new Product(1, "product", 1, 2.0);
+ assertNotNull(product.getName());
+ }
+
+}