diff --git a/JGit/pom.xml b/JGit/pom.xml index 176d55d321..deae1e45e3 100644 --- a/JGit/pom.xml +++ b/JGit/pom.xml @@ -5,9 +5,9 @@ com.baeldung JGit 1.0-SNAPSHOT + JGit jar http://maven.apache.org - JGit com.baeldung diff --git a/Twitter4J/pom.xml b/Twitter4J/pom.xml index 982c1adc23..b82b9f6778 100644 --- a/Twitter4J/pom.xml +++ b/Twitter4J/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 Twitter4J - jar Twitter4J + jar com.baeldung diff --git a/akka-http/pom.xml b/akka-http/pom.xml index 51e70fb583..05e50d2229 100644 --- a/akka-http/pom.xml +++ b/akka-http/pom.xml @@ -23,7 +23,7 @@ com.typesafe.akka akka-stream_2.12 - 2.5.11 + ${akka.stream.version} com.typesafe.akka diff --git a/algorithms-miscellaneous-1/README.md b/algorithms-miscellaneous-1/README.md index 6f18396005..7ed805f7c4 100644 --- a/algorithms-miscellaneous-1/README.md +++ b/algorithms-miscellaneous-1/README.md @@ -15,3 +15,5 @@ - [Find Substrings That Are Palindromes in Java](https://www.baeldung.com/java-palindrome-substrings) - [Find the Longest Substring without Repeating Characters](https://www.baeldung.com/java-longest-substring-without-repeated-characters) - [Java Two Pointer Technique](https://www.baeldung.com/java-two-pointer-technique) +- [Permutations of an Array in Java](https://www.baeldung.com/java-array-permutations) +- [Implementing Simple State Machines with Java Enums](https://www.baeldung.com/java-enum-simple-state-machine) diff --git a/algorithms-miscellaneous-2/pom.xml b/algorithms-miscellaneous-2/pom.xml index 5461f4ebe1..d5f3172eaa 100644 --- a/algorithms-miscellaneous-2/pom.xml +++ b/algorithms-miscellaneous-2/pom.xml @@ -68,7 +68,7 @@ org.codehaus.mojo cobertura-maven-plugin - 2.7 + ${cobertura-maven-plugin.version} @@ -91,6 +91,7 @@ 1.0.1 3.9.0 1.11 + 2.7 \ No newline at end of file diff --git a/algorithms-miscellaneous-2/src/test/resources/graph.png b/algorithms-miscellaneous-2/src/test/resources/graph.png index 56995b8dd9..7165a51782 100644 Binary files a/algorithms-miscellaneous-2/src/test/resources/graph.png and b/algorithms-miscellaneous-2/src/test/resources/graph.png differ diff --git a/animal-sniffer-mvn-plugin/pom.xml b/animal-sniffer-mvn-plugin/pom.xml index cdfb1fb2a3..55e37e2ec4 100644 --- a/animal-sniffer-mvn-plugin/pom.xml +++ b/animal-sniffer-mvn-plugin/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung animal-sniffer-mvn-plugin - jar 1.0-SNAPSHOT animal-sniffer-mvn-plugin + jar http://maven.apache.org diff --git a/annotations/pom.xml b/annotations/pom.xml index 6d83f5b057..5fe89adf0a 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 annotations - pom annotations + pom parent-modules diff --git a/apache-avro/pom.xml b/apache-avro/pom.xml index 18f9c34d64..b98e52be75 100644 --- a/apache-avro/pom.xml +++ b/apache-avro/pom.xml @@ -7,14 +7,6 @@ 0.0.1-SNAPSHOT apache-avro - - UTF-8 - 3.5 - 1.8.2 - 1.8 - 1.7.25 - - com.baeldung parent-modules @@ -85,4 +77,13 @@ + + + UTF-8 + 3.5 + 1.8.2 + 1.8 + 1.7.25 + + diff --git a/apache-curator/pom.xml b/apache-curator/pom.xml index e6be32277d..3306c0613f 100644 --- a/apache-curator/pom.xml +++ b/apache-curator/pom.xml @@ -3,8 +3,8 @@ 4.0.0 apache-curator 0.0.1-SNAPSHOT - jar apache-curator + jar com.baeldung diff --git a/apache-geode/pom.xml b/apache-geode/pom.xml index 738accdcb8..a39e4a811e 100644 --- a/apache-geode/pom.xml +++ b/apache-geode/pom.xml @@ -12,22 +12,6 @@ parent-modules 1.0.0-SNAPSHOT - - - 1.6.0 - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - @@ -38,8 +22,26 @@ junit junit - RELEASE + ${junit.version} + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + 1.6.0 + 1.8 + 1.8 + \ No newline at end of file diff --git a/apache-meecrowave/pom.xml b/apache-meecrowave/pom.xml index cf13aa1c1b..fb5af69f9b 100644 --- a/apache-meecrowave/pom.xml +++ b/apache-meecrowave/pom.xml @@ -7,51 +7,58 @@ apache-meecrowave A sample REST API application with Meecrowave - - 1.8 - 1.8 - org.apache.meecrowave meecrowave-core - 1.2.1 + ${meecrowave-core.version} org.apache.meecrowave meecrowave-jpa - 1.2.1 + ${meecrowave-jpa.version} com.squareup.okhttp3 okhttp - 3.10.0 + ${okhttp.version} org.apache.meecrowave meecrowave-junit - 1.2.0 + ${meecrowave-junit.version} test junit junit - 4.10 + ${junit.version} test - + org.apache.meecrowave meecrowave-maven-plugin - 1.2.1 + ${meecrowave-maven-plugin.version} + + + 1.8 + 1.8 + 4.10 + 1.2.0 + 3.10.0 + 1.2.1 + 1.2.1 + 1.2.1 + \ No newline at end of file diff --git a/apache-pulsar/pom.xml b/apache-pulsar/pom.xml index a4c09586eb..11df6d0b87 100644 --- a/apache-pulsar/pom.xml +++ b/apache-pulsar/pom.xml @@ -11,12 +11,14 @@ org.apache.pulsar pulsar-client - 2.1.1-incubating + ${pulsar-client.version} compile + 1.8 1.8 + 2.1.1-incubating diff --git a/apache-solrj/pom.xml b/apache-solrj/pom.xml index 9a807c2f26..1227fdca46 100644 --- a/apache-solrj/pom.xml +++ b/apache-solrj/pom.xml @@ -4,8 +4,8 @@ com.baeldung apache-solrj 0.0.1-SNAPSHOT - jar apache-solrj + jar com.baeldung diff --git a/apache-spark/README.md b/apache-spark/README.md index fb8059eb27..a4dce212b4 100644 --- a/apache-spark/README.md +++ b/apache-spark/README.md @@ -1,3 +1,4 @@ ### Relevant articles - [Introduction to Apache Spark](http://www.baeldung.com/apache-spark) +- [Building a Data Pipeline with Kafka, Spark Streaming and Cassandra](https://www.baeldung.com/kafka-spark-data-pipeline) diff --git a/apache-spark/pom.xml b/apache-spark/pom.xml index b05b97198d..1aed5b1db9 100644 --- a/apache-spark/pom.xml +++ b/apache-spark/pom.xml @@ -4,8 +4,8 @@ com.baeldung apache-spark 1.0-SNAPSHOT - jar apache-spark + jar http://maven.apache.org @@ -54,10 +54,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.2 + ${maven-compiler-plugin.version} - 1.8 - 1.8 + ${maven.compiler.source} + ${maven.compiler.target} @@ -85,6 +85,9 @@ 2.3.0 2.3.0 1.5.2 + 1.8 + 1.8 + 3.2 diff --git a/apache-velocity/pom.xml b/apache-velocity/pom.xml index 19cf77d945..a0a8389f7d 100644 --- a/apache-velocity/pom.xml +++ b/apache-velocity/pom.xml @@ -4,8 +4,8 @@ com.baeldung 0.1-SNAPSHOT apache-velocity - war apache-velocity + war com.baeldung diff --git a/aws-lambda/pom.xml b/aws-lambda/pom.xml index c47c3cd86f..c799718e61 100644 --- a/aws-lambda/pom.xml +++ b/aws-lambda/pom.xml @@ -5,8 +5,8 @@ com.baeldung aws-lambda 0.1.0-SNAPSHOT - jar aws-lambda + jar parent-modules diff --git a/aws/pom.xml b/aws/pom.xml index ab63f6afa1..560f9145f9 100644 --- a/aws/pom.xml +++ b/aws/pom.xml @@ -4,8 +4,8 @@ com.baeldung aws 0.1.0-SNAPSHOT - jar aws + jar com.baeldung diff --git a/axon/pom.xml b/axon/pom.xml index 598dc820e5..2b9ac1fcdd 100644 --- a/axon/pom.xml +++ b/axon/pom.xml @@ -36,7 +36,7 @@ org.springframework.boot spring-boot-autoconfigure - 2.1.1.RELEASE + ${spring-boot.version} compile diff --git a/azure/pom.xml b/azure/pom.xml index 555efeef70..e2a05796d6 100644 --- a/azure/pom.xml +++ b/azure/pom.xml @@ -5,9 +5,9 @@ com.baeldung azure 0.1 - war azure Demo project for Spring Boot on Azure + war parent-boot-2 diff --git a/blade/pom.xml b/blade/pom.xml index 6bad505f4a..37615bed01 100644 --- a/blade/pom.xml +++ b/blade/pom.xml @@ -3,12 +3,12 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 - blade - blade - com.baeldung + blade 1.0.0-SNAPSHOT + blade + @@ -17,35 +17,30 @@ - - 1.8 - 1.8 - - com.bladejava blade-mvc - 2.0.14.RELEASE + ${blade-mvc.version} org.webjars bootstrap - 4.2.1 + ${bootstrap.version} org.apache.commons commons-lang3 - 3.8.1 + ${commons-lang3.version} org.projectlombok lombok - 1.18.4 + ${lombok.version} provided @@ -53,31 +48,31 @@ junit junit - 4.12 + ${junit.version} test org.assertj assertj-core - 3.11.1 + ${assertj-core.version} test org.apache.httpcomponents httpclient - 4.5.6 + ${httpclient.version} test org.apache.httpcomponents httpmime - 4.5.6 + ${httpmime.version} test org.apache.httpcomponents httpcore - 4.4.10 + ${httpcore.version} test @@ -88,6 +83,7 @@ org.apache.maven.plugins maven-surefire-plugin + ${maven-surefire-plugin.version} 3 true @@ -100,7 +96,7 @@ org.apache.maven.plugins maven-failsafe-plugin - 3.0.0-M3 + ${maven-failsafe-plugin.version} **/*LiveTest.java @@ -119,7 +115,7 @@ com.bazaarvoice.maven.plugins process-exec-maven-plugin - 0.7 + ${process-exec-maven-plugin.version} @@ -177,13 +173,33 @@ + org.apache.maven.plugins maven-compiler-plugin + ${maven-compiler-plugin.version} - 1.8 - 1.8 + ${maven.compiler.source} + ${maven.compiler.target} UTF-8 + + + 1.8 + 1.8 + 2.0.14.RELEASE + 4.2.1 + 3.8.1 + 1.18.4 + 4.12 + 4.5.6 + 4.5.6 + 4.4.10 + 3.11.1 + 3.0.0-M3 + 0.7 + 2.21.0 + 3.7.0 + diff --git a/bootique/pom.xml b/bootique/pom.xml index 880b9a516f..4ae8703074 100644 --- a/bootique/pom.xml +++ b/bootique/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung.bootique bootique - jar 1.0-SNAPSHOT bootique + jar http://maven.apache.org diff --git a/cas/cas-secured-app/pom.xml b/cas/cas-secured-app/pom.xml index 2291da9084..338a9e5653 100644 --- a/cas/cas-secured-app/pom.xml +++ b/cas/cas-secured-app/pom.xml @@ -3,9 +3,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 cas-secured-app - jar cas-secured-app Demo project for CAS + jar parent-boot-1 diff --git a/cdi/pom.xml b/cdi/pom.xml index 0cf5062ccc..ba649127a0 100644 --- a/cdi/pom.xml +++ b/cdi/pom.xml @@ -59,6 +59,7 @@ test + 2.0.SP1 3.0.5.Final diff --git a/checker-plugin/pom.xml b/checker-plugin/pom.xml index 45f0939e77..08408366a4 100644 --- a/checker-plugin/pom.xml +++ b/checker-plugin/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung checker-plugin - jar 1.0-SNAPSHOT checker-plugin + jar http://maven.apache.org diff --git a/core-groovy/src/main/groovy/com/baeldung/file/ReadFile.groovy b/core-groovy/src/main/groovy/com/baeldung/file/ReadFile.groovy new file mode 100644 index 0000000000..4239fa534c --- /dev/null +++ b/core-groovy/src/main/groovy/com/baeldung/file/ReadFile.groovy @@ -0,0 +1,107 @@ +package com.baeldung.file + +class ReadFile { + + /** + * reads file content line by line using withReader and reader.readLine + * @param filePath + * @return + */ + int readFileLineByLine(String filePath) { + File file = new File(filePath) + def line, noOfLines = 0; + file.withReader { reader -> + while ((line = reader.readLine())!=null) + { + println "${line}" + noOfLines++ + } + } + return noOfLines + } + + /** + * reads file content in list of lines + * @param filePath + * @return + */ + List readFileInList(String filePath) { + File file = new File(filePath) + def lines = file.readLines() + return lines + } + + /** + * reads file content in string using File.text + * @param filePath + * @return + */ + String readFileString(String filePath) { + File file = new File(filePath) + String fileContent = file.text + return fileContent + } + + /** + * reads file content in string with encoding using File.getText + * @param filePath + * @return + */ + String readFileStringWithCharset(String filePath) { + File file = new File(filePath) + String utf8Content = file.getText("UTF-8") + return utf8Content + } + + /** + * reads content of binary file and returns byte array + * @param filePath + * @return + */ + byte[] readBinaryFile(String filePath) { + File file = new File(filePath) + byte[] binaryContent = file.bytes + return binaryContent + } + + /** + * More Examples of reading a file + * @return + */ + def moreExamples() { + + //with reader with utf-8 + new File("src/main/resources/utf8Content.html").withReader('UTF-8') { reader -> + def line + while ((line = reader.readLine())!=null) { + println "${line}" + } + } + + //collect api + def list = new File("src/main/resources/fileContent.txt").collect {it} + + //as operator + def array = new File("src/main/resources/fileContent.txt") as String[] + + //eachline + new File("src/main/resources/fileContent.txt").eachLine { line -> + println line + } + + //newInputStream with eachLine + def is = new File("src/main/resources/fileContent.txt").newInputStream() + is.eachLine { + println it + } + is.close() + + //withInputStream + new File("src/main/resources/fileContent.txt").withInputStream { stream -> + stream.eachLine { line -> + println line + } + } + } + +} \ No newline at end of file diff --git a/core-groovy/src/main/resources/fileContent.txt b/core-groovy/src/main/resources/fileContent.txt new file mode 100644 index 0000000000..643e4af3de --- /dev/null +++ b/core-groovy/src/main/resources/fileContent.txt @@ -0,0 +1,3 @@ +Line 1 : Hello World!!! +Line 2 : This is a file content. +Line 3 : String content diff --git a/core-groovy/src/main/resources/sample.png b/core-groovy/src/main/resources/sample.png new file mode 100644 index 0000000000..7d473430b7 Binary files /dev/null and b/core-groovy/src/main/resources/sample.png differ diff --git a/core-groovy/src/main/resources/utf8Content.html b/core-groovy/src/main/resources/utf8Content.html new file mode 100644 index 0000000000..61ff338f6c --- /dev/null +++ b/core-groovy/src/main/resources/utf8Content.html @@ -0,0 +1,12 @@ + + + + +
+ᚠᛇᚻ᛫ᛒᛦᚦ᛫ᚠᚱᚩᚠᚢᚱ᛫ᚠᛁᚱᚪ᛫ᚷᛖᚻᚹᛦᛚᚳᚢᛗ
+ᛋᚳᛖᚪᛚ᛫ᚦᛖᚪᚻ᛫ᛗᚪᚾᚾᚪ᛫ᚷᛖᚻᚹᛦᛚᚳ᛫ᛗᛁᚳᛚᚢᚾ᛫ᚻᛦᛏ᛫ᛞᚫᛚᚪᚾ
+ᚷᛁᚠ᛫ᚻᛖ᛫ᚹᛁᛚᛖ᛫ᚠᚩᚱ᛫ᛞᚱᛁᚻᛏᚾᛖ᛫ᛞᚩᛗᛖᛋ᛫ᚻᛚᛇᛏᚪᚾ
+
+ + \ No newline at end of file diff --git a/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy b/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy new file mode 100644 index 0000000000..a479c265c4 --- /dev/null +++ b/core-groovy/src/test/groovy/com/baeldung/file/ReadFileUnitTest.groovy @@ -0,0 +1,70 @@ +package com.baeldung.file + +import spock.lang.Specification + +class ReadFileUnitTest extends Specification { + + ReadFile readFile + + void setup () { + readFile = new ReadFile() + } + + def 'Should return number of lines in File using ReadFile.readFileLineByLine given filePath' () { + given: + def filePath = "src/main/resources/fileContent.txt" + when: + def noOfLines = readFile.readFileLineByLine(filePath) + then: + noOfLines + noOfLines instanceof Integer + assert noOfLines, 3 + } + + def 'Should return File Content in list of lines using ReadFile.readFileInList given filePath' () { + given: + def filePath = "src/main/resources/fileContent.txt" + when: + def lines = readFile.readFileInList(filePath) + then: + lines + lines instanceof List + assert lines.size(), 3 + } + + def 'Should return file content in string using ReadFile.readFileString given filePath' () { + given: + def filePath = "src/main/resources/fileContent.txt" + when: + def fileContent = readFile.readFileString(filePath) + then: + fileContent + fileContent instanceof String + fileContent.contains("""Line 1 : Hello World!!! +Line 2 : This is a file content. +Line 3 : String content""") + + } + + def 'Should return UTF-8 encoded file content in string using ReadFile.readFileStringWithCharset given filePath' () { + given: + def filePath = "src/main/resources/utf8Content.html" + when: + def encodedContent = readFile.readFileStringWithCharset(filePath) + then: + encodedContent + encodedContent instanceof String + } + + def 'Should return binary file content in byte array using ReadFile.readBinaryFile given filePath' () { + given: + def filePath = "src/main/resources/sample.png" + when: + def binaryContent = readFile.readBinaryFile(filePath) + then: + binaryContent + binaryContent instanceof byte[] + binaryContent.length == 329 + } + +} \ No newline at end of file diff --git a/core-java-10/pom.xml b/core-java-10/pom.xml index 9fcdd9a162..b15f8b5d63 100644 --- a/core-java-10/pom.xml +++ b/core-java-10/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung core-java-10 - jar 0.1.0-SNAPSHOT core-java-10 + jar http://maven.apache.org diff --git a/core-java-11/README.md b/core-java-11/README.md index c8039f4bc5..3c8b94fa28 100644 --- a/core-java-11/README.md +++ b/core-java-11/README.md @@ -3,3 +3,4 @@ - [Java 11 Single File Source Code](https://www.baeldung.com/java-single-file-source-code) - [Java 11 Local Variable Syntax for Lambda Parameters](https://www.baeldung.com/java-var-lambda-params) - [Java 11 String API Additions](https://www.baeldung.com/java-11-string-api) +- [Java 11 Nest Based Access Control](https://www.baeldung.com/java-nest-based-access-control) diff --git a/core-java-11/pom.xml b/core-java-11/pom.xml index 4dcab49867..a9776d8f3b 100644 --- a/core-java-11/pom.xml +++ b/core-java-11/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung core-java-11 - jar 0.1.0-SNAPSHOT core-java-11 + jar http://maven.apache.org diff --git a/core-java-8/pom.xml b/core-java-8/pom.xml index 112e8b764d..b4519a8161 100644 --- a/core-java-8/pom.xml +++ b/core-java-8/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-8 0.1.0-SNAPSHOT - jar core-java-8 + jar com.baeldung diff --git a/core-java-8/src/test/java/com/baeldung/collectors/Java8CollectorsUnitTest.java b/core-java-8/src/test/java/com/baeldung/collectors/Java8CollectorsUnitTest.java index bad1c32e4a..9ace27e38f 100644 --- a/core-java-8/src/test/java/com/baeldung/collectors/Java8CollectorsUnitTest.java +++ b/core-java-8/src/test/java/com/baeldung/collectors/Java8CollectorsUnitTest.java @@ -39,6 +39,7 @@ import static org.assertj.core.api.Assertions.assertThatThrownBy; public class Java8CollectorsUnitTest { private final List givenList = Arrays.asList("a", "bb", "ccc", "dd"); + private final List listWithDuplicates = Arrays.asList("a", "bb", "c", "d", "bb"); @Test public void whenCollectingToList_shouldCollectToList() throws Exception { @@ -48,12 +49,19 @@ public class Java8CollectorsUnitTest { } @Test - public void whenCollectingToList_shouldCollectToSet() throws Exception { + public void whenCollectingToSet_shouldCollectToSet() throws Exception { final Set result = givenList.stream().collect(toSet()); assertThat(result).containsAll(givenList); } + @Test + public void givenContainsDuplicateElements_whenCollectingToSet_shouldAddDuplicateElementsOnlyOnce() throws Exception { + final Set result = listWithDuplicates.stream().collect(toSet()); + + assertThat(result).hasSize(4); + } + @Test public void whenCollectingToCollection_shouldCollectToCollection() throws Exception { final List result = givenList.stream().collect(toCollection(LinkedList::new)); @@ -83,6 +91,13 @@ public class Java8CollectorsUnitTest { assertThat(result).containsEntry("a", 1).containsEntry("bb", 2).containsEntry("ccc", 3).containsEntry("dd", 2); } + @Test + public void givenContainsDuplicateElements_whenCollectingToMap_shouldThrowException() throws Exception { + assertThatThrownBy(() -> { + listWithDuplicates.stream().collect(toMap(Function.identity(), String::length)); + }).isInstanceOf(IllegalStateException.class); + } + @Test public void whenCollectingAndThen_shouldCollect() throws Exception { final List result = givenList.stream().collect(collectingAndThen(toList(), ImmutableList::copyOf)); diff --git a/core-java-8/src/test/java/com/baeldung/java8/lambda/methodreference/MethodReferenceExamples.java b/core-java-8/src/test/java/com/baeldung/java8/lambda/methodreference/MethodReferenceUnitTest.java similarity index 89% rename from core-java-8/src/test/java/com/baeldung/java8/lambda/methodreference/MethodReferenceExamples.java rename to core-java-8/src/test/java/com/baeldung/java8/lambda/methodreference/MethodReferenceUnitTest.java index ede0ef9f70..835815aecd 100644 --- a/core-java-8/src/test/java/com/baeldung/java8/lambda/methodreference/MethodReferenceExamples.java +++ b/core-java-8/src/test/java/com/baeldung/java8/lambda/methodreference/MethodReferenceUnitTest.java @@ -5,22 +5,21 @@ import java.util.Arrays; import java.util.List; import java.util.function.BiFunction; +import org.apache.commons.lang3.StringUtils; import org.junit.Test; -public class MethodReferenceExamples { +public class MethodReferenceUnitTest { private static void doNothingAtAll(Object... o) { } ; - + @Test public void referenceToStaticMethod() { List messages = Arrays.asList("Hello", "Baeldung", "readers!"); - messages.forEach((word) -> { - System.out.println(word); - }); - messages.forEach(System.out::println); + messages.forEach(word -> StringUtils.capitalize(word)); + messages.forEach(StringUtils::capitalize); } @Test @@ -63,7 +62,7 @@ public class MethodReferenceExamples { @Test public void limitationsAndAdditionalExamples() { createBicyclesList().forEach(b -> System.out.printf("Bike brand is '%s' and frame size is '%d'%n", b.getBrand(), b.getFrameSize())); - createBicyclesList().forEach((o) -> MethodReferenceExamples.doNothingAtAll(o)); + createBicyclesList().forEach((o) -> MethodReferenceUnitTest.doNothingAtAll(o)); } private List createBicyclesList() { diff --git a/core-java-9/README.md b/core-java-9/README.md index c96267dc95..d9586ba684 100644 --- a/core-java-9/README.md +++ b/core-java-9/README.md @@ -26,3 +26,4 @@ - [Initialize a HashMap in Java](https://www.baeldung.com/java-initialize-hashmap) - [Java 9 Platform Logging API](https://www.baeldung.com/java-9-logging-api) - [Guide to java.lang.Process API](https://www.baeldung.com/java-process-api) +- [Immutable Set in Java](https://www.baeldung.com/java-immutable-set) diff --git a/core-java-9/compile-aot.sh b/core-java-9/compile-aot.sh new file mode 100755 index 0000000000..c3a39b0196 --- /dev/null +++ b/core-java-9/compile-aot.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash +cd src/main/java +javac com/baeldung/java9/aot/JaotCompilation.java +jaotc --output jaotCompilation.so com/baeldung/java9/aot/JaotCompilation.class + diff --git a/core-java-9/run-aot.sh b/core-java-9/run-aot.sh new file mode 100755 index 0000000000..89fc616469 --- /dev/null +++ b/core-java-9/run-aot.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +cd src/main/java +java -XX:AOTLibrary=./jaotCompilation.so com/baeldung/java9/aot/JaotCompilation \ No newline at end of file diff --git a/core-java-9/src/main/java/com/baeldung/java9/aot/JaotCompilation.java b/core-java-9/src/main/java/com/baeldung/java9/aot/JaotCompilation.java new file mode 100644 index 0000000000..4d8a018d6b --- /dev/null +++ b/core-java-9/src/main/java/com/baeldung/java9/aot/JaotCompilation.java @@ -0,0 +1,12 @@ +package com.baeldung.java9.aot; + +public class JaotCompilation { + + public static void main(String[] argv) { + System.out.println(message()); + } + + public static String message() { + return "The JAOT compiler says 'Hello'"; + } +} \ No newline at end of file diff --git a/core-java-arrays/README.md b/core-java-arrays/README.md index 400dd7793c..ed8221ebe4 100644 --- a/core-java-arrays/README.md +++ b/core-java-arrays/README.md @@ -14,3 +14,4 @@ - [Array Operations in Java](http://www.baeldung.com/java-common-array-operations) - [Intersection Between two Integer Arrays](https://www.baeldung.com/java-array-intersection) - [Sorting Arrays in Java](https://www.baeldung.com/java-sorting-arrays) +- [Convert a Float to a Byte Array in Java](https://www.baeldung.com/java-convert-float-to-byte-array) diff --git a/core-java-arrays/pom.xml b/core-java-arrays/pom.xml index d2d0453e87..39ac764b27 100644 --- a/core-java-arrays/pom.xml +++ b/core-java-arrays/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-arrays 0.1.0-SNAPSHOT - jar core-java-arrays + jar com.baeldung diff --git a/core-java-collections-list/pom.xml b/core-java-collections-list/pom.xml index a7e711088a..737be8ee34 100644 --- a/core-java-collections-list/pom.xml +++ b/core-java-collections-list/pom.xml @@ -3,8 +3,8 @@ 4.0.0 core-java-collections-list 0.1.0-SNAPSHOT - jar core-java-collections-list + jar com.baeldung @@ -40,17 +40,17 @@ net.sf.trove4j trove4j - 3.0.2 + ${trove4j.version} it.unimi.dsi fastutil - 8.1.0 + ${fastutil.version} colt colt - 1.2.0 + ${colt.version} @@ -60,5 +60,8 @@ 1.7.0 3.11.1 1.16.12 + 3.0.2 + 8.1.0 + 1.2.0
diff --git a/core-java-collections/README.md b/core-java-collections/README.md index be83621429..710be31a08 100644 --- a/core-java-collections/README.md +++ b/core-java-collections/README.md @@ -31,3 +31,4 @@ - [A Guide to EnumMap](https://www.baeldung.com/java-enum-map) - [A Guide to Iterator in Java](http://www.baeldung.com/java-iterator) - [Differences Between HashMap and Hashtable](https://www.baeldung.com/hashmap-hashtable-differences) +- [Java ArrayList vs Vector](https://www.baeldung.com/java-arraylist-vs-vector) diff --git a/core-java-collections/pom.xml b/core-java-collections/pom.xml index 2201ee8b15..261558836d 100644 --- a/core-java-collections/pom.xml +++ b/core-java-collections/pom.xml @@ -3,8 +3,8 @@ 4.0.0 core-java-collections 0.1.0-SNAPSHOT - jar core-java-collections + jar com.baeldung @@ -54,7 +54,7 @@ org.apache.commons commons-exec - 1.3 + ${commons-exec.version} org.projectlombok @@ -74,5 +74,6 @@ 3.11.1 7.1.0 1.16.12 + 1.3 diff --git a/core-java-collections/src/main/java/com/baeldung/charstack/CharStack.java b/core-java-collections/src/main/java/com/baeldung/charstack/CharStack.java new file mode 100644 index 0000000000..f789a68d90 --- /dev/null +++ b/core-java-collections/src/main/java/com/baeldung/charstack/CharStack.java @@ -0,0 +1,37 @@ +package com.baeldung.charstack; + +import java.util.Iterator; +import java.util.LinkedList; + +public class CharStack { + + private LinkedList items; + + public CharStack() { + this.items = new LinkedList(); + } + + public void push(Character item) { + items.push(item); + } + + public Character peek() { + return items.getFirst(); + } + + public Character pop() { + + Iterator iter = items.iterator(); + Character item = iter.next(); + if (item != null) { + iter.remove(); + return item; + } + return null; + } + + public int size() { + return items.size(); + } + +} diff --git a/core-java-collections/src/main/java/com/baeldung/charstack/CharStackWithArray.java b/core-java-collections/src/main/java/com/baeldung/charstack/CharStackWithArray.java new file mode 100644 index 0000000000..ed7fa3f253 --- /dev/null +++ b/core-java-collections/src/main/java/com/baeldung/charstack/CharStackWithArray.java @@ -0,0 +1,48 @@ +package com.baeldung.charstack; + +public class CharStackWithArray { + + private char[] elements; + private int size; + + public CharStackWithArray() { + size = 0; + elements = new char[4]; + } + + public int size() { + return size; + } + + public char peek() { + if (size == 0) { + throw new EmptyStackException(); + } + return elements[size - 1]; + } + + public char pop() { + if (size == 0) { + throw new EmptyStackException(); + } + + return elements[--size]; + } + + public void push(char item) { + ensureCapacity(size + 1); + elements[size] = item; + size++; + } + + private void ensureCapacity(int newSize) { + char newBiggerArray[]; + + if (elements.length < newSize) { + newBiggerArray = new char[elements.length * 2]; + System.arraycopy(elements, 0, newBiggerArray, 0, size); + elements = newBiggerArray; + } + } + +} diff --git a/core-java-collections/src/main/java/com/baeldung/charstack/EmptyStackException.java b/core-java-collections/src/main/java/com/baeldung/charstack/EmptyStackException.java new file mode 100644 index 0000000000..f005854e7f --- /dev/null +++ b/core-java-collections/src/main/java/com/baeldung/charstack/EmptyStackException.java @@ -0,0 +1,9 @@ +package com.baeldung.charstack; + +public class EmptyStackException extends RuntimeException { + + public EmptyStackException() { + super("Stack is empty"); + } + +} diff --git a/core-java-collections/src/main/java/com/baeldung/queueInterface/CustomBaeldungQueue.java b/core-java-collections/src/main/java/com/baeldung/queueInterface/CustomBaeldungQueue.java index 6b088a5079..4fcc211812 100644 --- a/core-java-collections/src/main/java/com/baeldung/queueInterface/CustomBaeldungQueue.java +++ b/core-java-collections/src/main/java/com/baeldung/queueInterface/CustomBaeldungQueue.java @@ -1,4 +1,4 @@ -package com.baeldung.queueinterface; +package com.baeldung.queueInterface; import java.util.AbstractQueue; import java.util.Iterator; diff --git a/core-java-collections/src/test/java/com/baeldung/charstack/CharStackUnitTest.java b/core-java-collections/src/test/java/com/baeldung/charstack/CharStackUnitTest.java new file mode 100644 index 0000000000..a20526fd9d --- /dev/null +++ b/core-java-collections/src/test/java/com/baeldung/charstack/CharStackUnitTest.java @@ -0,0 +1,50 @@ +package com.baeldung.charstack; + +import static org.junit.Assert.assertEquals; + +import org.junit.jupiter.api.Test; + +public class CharStackUnitTest { + + @Test + public void whenCharStackIsCreated_thenItHasSize0() { + + CharStack charStack = new CharStack(); + + assertEquals(0, charStack.size()); + } + + @Test + public void givenEmptyCharStack_whenElementIsPushed_thenStackSizeisIncreased() { + + CharStack charStack = new CharStack(); + + charStack.push('A'); + + assertEquals(1, charStack.size()); + } + + @Test + public void givenCharStack_whenElementIsPoppedFromStack_thenElementIsRemovedAndSizeChanges() { + + CharStack charStack = new CharStack(); + charStack.push('A'); + + char element = charStack.pop(); + + assertEquals('A', element); + assertEquals(0, charStack.size()); + } + + @Test + public void givenCharStack_whenElementIsPeeked_thenElementIsNotRemovedAndSizeDoesNotChange() { + CharStack charStack = new CharStack(); + charStack.push('A'); + + char element = charStack.peek(); + + assertEquals('A', element); + assertEquals(1, charStack.size()); + } + +} diff --git a/core-java-collections/src/test/java/com/baeldung/charstack/CharStackUsingJavaUnitTest.java b/core-java-collections/src/test/java/com/baeldung/charstack/CharStackUsingJavaUnitTest.java new file mode 100644 index 0000000000..964b901ae0 --- /dev/null +++ b/core-java-collections/src/test/java/com/baeldung/charstack/CharStackUsingJavaUnitTest.java @@ -0,0 +1,53 @@ +package com.baeldung.charstack; + +import static org.junit.Assert.assertEquals; + +import java.util.Stack; + +import org.junit.jupiter.api.Test; + +public class CharStackUsingJavaUnitTest { + + @Test + public void whenCharStackIsCreated_thenItHasSize0() { + + Stack charStack = new Stack<>(); + + assertEquals(0, charStack.size()); + } + + @Test + public void givenEmptyCharStack_whenElementIsPushed_thenStackSizeisIncreased() { + + Stack charStack = new Stack<>(); + + charStack.push('A'); + + assertEquals(1, charStack.size()); + } + + @Test + public void givenCharStack_whenElementIsPoppedFromStack_thenElementIsRemovedAndSizeChanges() { + + Stack charStack = new Stack<>(); + charStack.push('A'); + + char element = charStack.pop(); + + assertEquals('A', element); + assertEquals(0, charStack.size()); + } + + @Test + public void givenCharStack_whenElementIsPeeked_thenElementIsNotRemovedAndSizeDoesNotChange() { + + Stack charStack = new Stack<>(); + charStack.push('A'); + + char element = charStack.peek(); + + assertEquals('A', element); + assertEquals(1, charStack.size()); + } + +} diff --git a/core-java-collections/src/test/java/com/baeldung/charstack/CharStackWithArrayUnitTest.java b/core-java-collections/src/test/java/com/baeldung/charstack/CharStackWithArrayUnitTest.java new file mode 100644 index 0000000000..df90b8f0a4 --- /dev/null +++ b/core-java-collections/src/test/java/com/baeldung/charstack/CharStackWithArrayUnitTest.java @@ -0,0 +1,65 @@ +package com.baeldung.charstack; + +import static org.junit.Assert.assertEquals; + +import org.junit.jupiter.api.Test; + +public class CharStackWithArrayUnitTest { + + @Test + public void whenCharStackIsCreated_thenItHasSize0() { + + CharStackWithArray charStack = new CharStackWithArray(); + + assertEquals(0, charStack.size()); + } + + @Test + public void givenEmptyCharStack_whenElementIsPushed_thenStackSizeisIncreased() { + + CharStackWithArray charStack = new CharStackWithArray(); + + charStack.push('A'); + + assertEquals(1, charStack.size()); + } + + @Test + public void givenEmptyCharStack_when5ElementIsPushed_thenStackSizeis() { + + CharStackWithArray charStack = new CharStackWithArray(); + + charStack.push('A'); + charStack.push('B'); + charStack.push('C'); + charStack.push('D'); + charStack.push('E'); + + assertEquals(5, charStack.size()); + } + + @Test + public void givenCharStack_whenElementIsPoppedFromStack_thenElementIsRemovedAndSizeChanges() { + + CharStackWithArray charStack = new CharStackWithArray(); + charStack.push('A'); + + char element = charStack.pop(); + + assertEquals('A', element); + assertEquals(0, charStack.size()); + } + + @Test + public void givenCharStack_whenElementIsPeeked_thenElementIsNotRemovedAndSizeDoesNotChange() { + + CharStackWithArray charStack = new CharStackWithArray(); + charStack.push('A'); + + char element = charStack.peek(); + + assertEquals('A', element); + assertEquals(1, charStack.size()); + } + +} diff --git a/core-java-collections/src/test/java/com/baeldung/queueinterface/CustomBaeldungQueueUnitTest.java b/core-java-collections/src/test/java/com/baeldung/queueinterface/CustomBaeldungQueueUnitTest.java index 6dec768542..7471d9841d 100644 --- a/core-java-collections/src/test/java/com/baeldung/queueinterface/CustomBaeldungQueueUnitTest.java +++ b/core-java-collections/src/test/java/com/baeldung/queueinterface/CustomBaeldungQueueUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.queueinterface; +package com.baeldung.queueInterface; import org.junit.Before; import org.junit.Test; diff --git a/core-java-collections/src/test/java/com/baeldung/queueInterface/PriorityQueueUnitTest.java b/core-java-collections/src/test/java/com/baeldung/queueinterface/PriorityQueueUnitTest.java similarity index 96% rename from core-java-collections/src/test/java/com/baeldung/queueInterface/PriorityQueueUnitTest.java rename to core-java-collections/src/test/java/com/baeldung/queueinterface/PriorityQueueUnitTest.java index c5b564b55b..748099e8d1 100644 --- a/core-java-collections/src/test/java/com/baeldung/queueInterface/PriorityQueueUnitTest.java +++ b/core-java-collections/src/test/java/com/baeldung/queueinterface/PriorityQueueUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.queueinterface; +package com.baeldung.queueInterface; import org.junit.Before; import org.junit.Test; diff --git a/core-java-concurrency-advanced/pom.xml b/core-java-concurrency-advanced/pom.xml index 1209cba619..23032fb2e1 100644 --- a/core-java-concurrency-advanced/pom.xml +++ b/core-java-concurrency-advanced/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-concurrency-advanced 0.1.0-SNAPSHOT - jar core-java-concurrency-advanced + jar com.baeldung diff --git a/core-java-concurrency-basic/pom.xml b/core-java-concurrency-basic/pom.xml index 3544403aca..35c360769b 100644 --- a/core-java-concurrency-basic/pom.xml +++ b/core-java-concurrency-basic/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-concurrency-basic 0.1.0-SNAPSHOT - jar core-java-concurrency-basic + jar com.baeldung diff --git a/core-java-concurrency-collections/pom.xml b/core-java-concurrency-collections/pom.xml index 9473de8c51..e192bbe46f 100644 --- a/core-java-concurrency-collections/pom.xml +++ b/core-java-concurrency-collections/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-concurrency-collections 0.1.0-SNAPSHOT - jar core-java-concurrency-collections + jar com.baeldung diff --git a/core-java-io/README.md b/core-java-io/README.md index fcb3302a48..9a25009849 100644 --- a/core-java-io/README.md +++ b/core-java-io/README.md @@ -38,3 +38,5 @@ - [How to Get the File Extension of a File in Java](http://www.baeldung.com/java-file-extension) - [Getting a File’s Mime Type in Java](http://www.baeldung.com/java-file-mime-type) - [Create a Directory in Java](https://www.baeldung.com/java-create-directory) +- [How to Write to a CSV File in Java](https://www.baeldung.com/java-csv) +- [List Files in a Directory in Java](https://www.baeldung.com/java-list-directory-files) diff --git a/core-java-io/pom.xml b/core-java-io/pom.xml index 1f2d52de81..350e1a8b96 100644 --- a/core-java-io/pom.xml +++ b/core-java-io/pom.xml @@ -3,8 +3,8 @@ 4.0.0 core-java-io 0.1.0-SNAPSHOT - jar core-java-io + jar com.baeldung diff --git a/core-java-lang-oop/pom.xml b/core-java-lang-oop/pom.xml index 262408c024..8cfaf2b544 100644 --- a/core-java-lang-oop/pom.xml +++ b/core-java-lang-oop/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-lang-oop 0.1.0-SNAPSHOT - jar core-java-lang-oop + jar com.baeldung diff --git a/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/DeletableShape.java b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/DeletableShape.java new file mode 100644 index 0000000000..7674407da8 --- /dev/null +++ b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/DeletableShape.java @@ -0,0 +1,5 @@ +package com.baeldung.markerinterface; + +public interface DeletableShape extends Shape { + +} diff --git a/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/Rectangle.java b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/Rectangle.java new file mode 100644 index 0000000000..d64ffad0a2 --- /dev/null +++ b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/Rectangle.java @@ -0,0 +1,22 @@ +package com.baeldung.markerinterface; + +public class Rectangle implements DeletableShape { + + private double width; + private double height; + + public Rectangle(double width, double height) { + this.width = width; + this.height = height; + } + + @Override + public double getArea() { + return width * height; + } + + @Override + public double getCircumference() { + return 2 * (width + height); + } +} diff --git a/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/Shape.java b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/Shape.java new file mode 100644 index 0000000000..2e53aefc03 --- /dev/null +++ b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/Shape.java @@ -0,0 +1,6 @@ +package com.baeldung.markerinterface; + +public interface Shape { + double getArea(); + double getCircumference(); +} \ No newline at end of file diff --git a/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/ShapeDao.java b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/ShapeDao.java new file mode 100644 index 0000000000..bc988a793d --- /dev/null +++ b/core-java-lang-oop/src/main/java/com/baeldung/markerinterface/ShapeDao.java @@ -0,0 +1,14 @@ +package com.baeldung.markerinterface; + +public class ShapeDao { + + public boolean delete(Object object) { + if (!(object instanceof DeletableShape)) { + return false; + } + // Calling the code that deletes the entity from the database + + return true; + } + +} diff --git a/core-java-lang-oop/src/test/java/com/baeldung/markerinterface/MarkerInterfaceUnitTest.java b/core-java-lang-oop/src/test/java/com/baeldung/markerinterface/MarkerInterfaceUnitTest.java new file mode 100644 index 0000000000..70d32ba253 --- /dev/null +++ b/core-java-lang-oop/src/test/java/com/baeldung/markerinterface/MarkerInterfaceUnitTest.java @@ -0,0 +1,26 @@ +package com.baeldung.markerinterface; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +public class MarkerInterfaceUnitTest { + + @Test + public void givenDeletableObjectThenTrueReturned() { + ShapeDao shapeDao = new ShapeDao(); + Object rectangle = new Rectangle(2, 3); + + boolean result = shapeDao.delete(rectangle); + assertEquals(true, result); + } + + @Test + public void givenNonDeletableObjectThenFalseReturned() { + ShapeDao shapeDao = new ShapeDao(); + Object object = new Object(); + + boolean result = shapeDao.delete(object); + assertEquals(false, result); + } +} diff --git a/core-java-lang-syntax/README.md b/core-java-lang-syntax/README.md index a7c1b7cc4a..99c8613929 100644 --- a/core-java-lang-syntax/README.md +++ b/core-java-lang-syntax/README.md @@ -16,4 +16,5 @@ - [Quick Guide to java.lang.System](http://www.baeldung.com/java-lang-system) - [Java Switch Statement](https://www.baeldung.com/java-switch) - [The Modulo Operator in Java](https://www.baeldung.com/modulo-java) -- [Ternary Operator In Java](https://www.baeldung.com/java-ternary-operator) \ No newline at end of file +- [Ternary Operator In Java](https://www.baeldung.com/java-ternary-operator) +- [Java instanceof Operator](https://www.baeldung.com/java-instanceof) diff --git a/core-java-lang-syntax/pom.xml b/core-java-lang-syntax/pom.xml index 9481f29459..9a9df01057 100644 --- a/core-java-lang-syntax/pom.xml +++ b/core-java-lang-syntax/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-lang-syntax 0.1.0-SNAPSHOT - jar core-java-lang-syntax + jar com.baeldung diff --git a/core-java-lang/README.md b/core-java-lang/README.md index 7af962558d..c1c22caf6c 100644 --- a/core-java-lang/README.md +++ b/core-java-lang/README.md @@ -34,4 +34,10 @@ - [“Sneaky Throws” in Java](http://www.baeldung.com/java-sneaky-throws) - [Retrieving a Class Name in Java](https://www.baeldung.com/java-class-name) - [Java Compound Operators](https://www.baeldung.com/java-compound-operators) -- [Guide to Java Packages](https://www.baeldung.com/java-packages) \ No newline at end of file +- [Guide to Java Packages](https://www.baeldung.com/java-packages) +- [The Java Native Keyword and Methods](https://www.baeldung.com/java-native) +- [If-Else Statement in Java](https://www.baeldung.com/java-if-else) +- [Control Structures in Java](https://www.baeldung.com/java-control-structures) +- [Java Interfaces](https://www.baeldung.com/java-interfaces) +- [Attaching Values to Java Enum](https://www.baeldung.com/java-enum-values) +- [Variable Scope in Java](https://www.baeldung.com/java-variable-scope) diff --git a/core-java-lang/pom.xml b/core-java-lang/pom.xml index 283acab775..6881fd56db 100644 --- a/core-java-lang/pom.xml +++ b/core-java-lang/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-lang 0.1.0-SNAPSHOT - jar core-java-lang + jar com.baeldung diff --git a/core-java-lang/src/main/java/com/baeldung/scope/BracketScopeExample.java b/core-java-lang/src/main/java/com/baeldung/scope/BracketScopeExample.java index 37ae211dcb..8deec35c16 100644 --- a/core-java-lang/src/main/java/com/baeldung/scope/BracketScopeExample.java +++ b/core-java-lang/src/main/java/com/baeldung/scope/BracketScopeExample.java @@ -1,4 +1,4 @@ -package org.baeldung.variable.scope.examples; +package com.baeldung.scope; public class BracketScopeExample { diff --git a/core-java-lang/src/main/java/com/baeldung/scope/ClassScopeExample.java b/core-java-lang/src/main/java/com/baeldung/scope/ClassScopeExample.java index 241c6b466e..c81fcc9550 100644 --- a/core-java-lang/src/main/java/com/baeldung/scope/ClassScopeExample.java +++ b/core-java-lang/src/main/java/com/baeldung/scope/ClassScopeExample.java @@ -1,4 +1,4 @@ -package org.baeldung.variable.scope.examples; +package com.baeldung.scope; public class ClassScopeExample { diff --git a/core-java-lang/src/main/java/com/baeldung/scope/LoopScopeExample.java b/core-java-lang/src/main/java/com/baeldung/scope/LoopScopeExample.java index 7bf92a6d26..be41252623 100644 --- a/core-java-lang/src/main/java/com/baeldung/scope/LoopScopeExample.java +++ b/core-java-lang/src/main/java/com/baeldung/scope/LoopScopeExample.java @@ -1,4 +1,4 @@ -package org.baeldung.variable.scope.examples; +package com.baeldung.scope; import java.util.Arrays; import java.util.List; diff --git a/core-java-lang/src/main/java/com/baeldung/scope/MethodScopeExample.java b/core-java-lang/src/main/java/com/baeldung/scope/MethodScopeExample.java index e62c6a2a1c..63a6a25271 100644 --- a/core-java-lang/src/main/java/com/baeldung/scope/MethodScopeExample.java +++ b/core-java-lang/src/main/java/com/baeldung/scope/MethodScopeExample.java @@ -1,4 +1,4 @@ -package org.baeldung.variable.scope.examples; +package com.baeldung.scope; public class MethodScopeExample { diff --git a/core-java-lang/src/main/java/com/baeldung/scope/NestedScopesExample.java b/core-java-lang/src/main/java/com/baeldung/scope/NestedScopesExample.java index fcd23e5ae0..c3c5bec221 100644 --- a/core-java-lang/src/main/java/com/baeldung/scope/NestedScopesExample.java +++ b/core-java-lang/src/main/java/com/baeldung/scope/NestedScopesExample.java @@ -1,4 +1,4 @@ -package org.baeldung.variable.scope.examples; +package com.baeldung.scope; public class NestedScopesExample { diff --git a/core-java-lang/src/test/java/com/baeldung/java/enumiteration/EnumIterationExamples.java b/core-java-lang/src/test/java/com/baeldung/java/enumiteration/EnumIterationExamples.java index 2d874fa650..110943e39f 100644 --- a/core-java-lang/src/test/java/com/baeldung/java/enumiteration/EnumIterationExamples.java +++ b/core-java-lang/src/test/java/com/baeldung/java/enumiteration/EnumIterationExamples.java @@ -1,18 +1,43 @@ package com.baeldung.java.enumiteration; +import java.util.ArrayList; +import java.util.Arrays; import java.util.EnumSet; +import java.util.List; + public class EnumIterationExamples { public static void main(String[] args) { - System.out.println("Enum iteration using forEach:"); + System.out.println("Enum iteration using EnumSet:"); EnumSet.allOf(DaysOfWeekEnum.class).forEach(day -> System.out.println(day)); System.out.println("Enum iteration using Stream:"); DaysOfWeekEnum.stream().filter(d -> d.getTypeOfDay().equals("off")).forEach(System.out::println); - System.out.println("Enum iteration using for loop:"); + System.out.println("Enum iteration using a for loop:"); for (DaysOfWeekEnum day : DaysOfWeekEnum.values()) { System.out.println(day); } + + System.out.println("Enum iteration using Arrays.asList():"); + Arrays.asList(DaysOfWeekEnum.values()).forEach(day -> System.out.println(day)); + + System.out.println("Add Enum values to ArrayList:"); + List days = new ArrayList<>(); + days.add(DaysOfWeekEnum.FRIDAY); + days.add(DaysOfWeekEnum.SATURDAY); + days.add(DaysOfWeekEnum.SUNDAY); + for (DaysOfWeekEnum day : days) { + System.out.println(day); + } + System.out.println("Remove SATURDAY from the list:"); + days.remove(DaysOfWeekEnum.SATURDAY); + if (!days.contains(DaysOfWeekEnum.SATURDAY)) { + System.out.println("Saturday is no longer in the list"); + } + for (DaysOfWeekEnum day : days) { + System.out.println(day); + } + } } diff --git a/core-java-networking/pom.xml b/core-java-networking/pom.xml index d9c7c691e9..12bb257fcb 100644 --- a/core-java-networking/pom.xml +++ b/core-java-networking/pom.xml @@ -3,8 +3,8 @@ 4.0.0 core-java-networking 0.1.0-SNAPSHOT - jar core-java-networking + jar com.baeldung diff --git a/core-java-perf/README.md b/core-java-perf/README.md index 252ee4cc45..1b3b590bf8 100644 --- a/core-java-perf/README.md +++ b/core-java-perf/README.md @@ -5,4 +5,5 @@ - [Different Ways to Capture Java Heap Dumps](https://www.baeldung.com/java-heap-dump-capture) - [Understanding Memory Leaks in Java](https://www.baeldung.com/java-memory-leaks) - [OutOfMemoryError: GC Overhead Limit Exceeded](http://www.baeldung.com/java-gc-overhead-limit-exceeded) -- [Basic Introduction to JMX](http://www.baeldung.com/java-management-extensions) \ No newline at end of file +- [Basic Introduction to JMX](http://www.baeldung.com/java-management-extensions) +- [Monitoring Java Applications with Flight Recorder](https://www.baeldung.com/java-flight-recorder-monitoring) diff --git a/core-java-perf/pom.xml b/core-java-perf/pom.xml index 062f76db77..0e0ec79691 100644 --- a/core-java-perf/pom.xml +++ b/core-java-perf/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-perf 0.1.0-SNAPSHOT - jar core-java-perf + jar com.baeldung diff --git a/core-java-security/README.md b/core-java-security/README.md index 415171094b..d3343f79ca 100644 --- a/core-java-security/README.md +++ b/core-java-security/README.md @@ -8,4 +8,5 @@ - [Encrypting and Decrypting Files in Java](http://www.baeldung.com/java-cipher-input-output-stream) - [Hashing a Password in Java](https://www.baeldung.com/java-password-hashing) - [SSL Handshake Failures](https://www.baeldung.com/java-ssl-handshake-failures) -- [SHA-256 Hashing in Java](https://www.baeldung.com/sha-256-hashing-java) \ No newline at end of file +- [SHA-256 Hashing in Java](https://www.baeldung.com/sha-256-hashing-java) +- [Enabling TLS v1.2 in Java 7](https://www.baeldung.com/java-7-tls-v12) diff --git a/core-java-security/pom.xml b/core-java-security/pom.xml index 7c4ab9763f..63bc46b114 100644 --- a/core-java-security/pom.xml +++ b/core-java-security/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-security 0.1.0-SNAPSHOT - jar core-java-security + jar com.baeldung diff --git a/core-java-sun/pom.xml b/core-java-sun/pom.xml index ef68c947ce..6099e7a5ac 100644 --- a/core-java-sun/pom.xml +++ b/core-java-sun/pom.xml @@ -4,8 +4,8 @@ com.baeldung core-java-sun 0.1.0-SNAPSHOT - jar core-java-sun + jar com.baeldung diff --git a/core-java/README.md b/core-java/README.md index d6cb619ed3..d2fd903c10 100644 --- a/core-java/README.md +++ b/core-java/README.md @@ -47,3 +47,7 @@ - [Console I/O in Java](http://www.baeldung.com/java-console-input-output) - [Formatting with printf() in Java](https://www.baeldung.com/java-printstream-printf) - [Retrieve Fields from a Java Class Using Reflection](https://www.baeldung.com/java-reflection-class-fields) +- [Introduction to Basic Syntax in Java](https://www.baeldung.com/java-syntax) +- [Using Curl in Java](https://www.baeldung.com/java-curl) +- [Finding Leap Years in Java](https://www.baeldung.com/java-leap-year) +- [Java Bitwise Operators](https://www.baeldung.com/java-bitwise-operators) diff --git a/core-java/src/main/java/com/baeldung/jar/JarExample.java b/core-java/src/main/java/com/baeldung/jar/JarExample.java new file mode 100644 index 0000000000..5f33188adf --- /dev/null +++ b/core-java/src/main/java/com/baeldung/jar/JarExample.java @@ -0,0 +1,9 @@ +package com.baeldung.jar; + +public class JarExample { + + public static void main(String[] args) { + System.out.println("Hello Baeldung Reader!"); + } + +} diff --git a/core-java/src/main/java/com/baeldung/jar/example_manifest.txt b/core-java/src/main/java/com/baeldung/jar/example_manifest.txt new file mode 100644 index 0000000000..90e83e9b42 --- /dev/null +++ b/core-java/src/main/java/com/baeldung/jar/example_manifest.txt @@ -0,0 +1 @@ +Main-Class: com.baeldung.jar.JarExample diff --git a/core-kotlin/README.md b/core-kotlin/README.md index 225ad87e87..6ee79b2a2e 100644 --- a/core-kotlin/README.md +++ b/core-kotlin/README.md @@ -51,3 +51,4 @@ - [Operator Overloading in Kotlin](https://www.baeldung.com/kotlin-operator-overloading) - [Inline Classes in Kotlin](https://www.baeldung.com/kotlin-inline-classes) - [Creating Java static final Equivalents in Kotlin](https://www.baeldung.com/kotlin-java-static-final) +- [Nested forEach in Kotlin](https://www.baeldung.com/kotlin-nested-foreach) diff --git a/core-kotlin/pom.xml b/core-kotlin/pom.xml index ed79ebc01b..5de986b49e 100644 --- a/core-kotlin/pom.xml +++ b/core-kotlin/pom.xml @@ -64,13 +64,13 @@ nl.komponents.kovenant kovenant - 3.3.0 + ${kovenant.version} pom uy.kohesive.injekt injekt-core - 1.16.1 + ${injekt-core.version} @@ -82,6 +82,8 @@ 3.10.0 1.4.197 1.15.0 + 3.3.0 + 1.16.1 diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt b/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt index 40cd9adc99..daaedca5a3 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt +++ b/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/CalculatorTest5.kt @@ -7,12 +7,12 @@ class CalculatorTest5 { private val calculator = Calculator() @Test - fun whenAdding1and3_thenAnswerIs4() { + fun `Adding 1 and 3 should be equal to 4`() { Assertions.assertEquals(4, calculator.add(1, 3)) } @Test - fun whenDividingBy0_thenErrorOccurs() { + fun `Dividing by zero should throw the DivideByZeroException`() { val exception = Assertions.assertThrows(DivideByZeroException::class.java) { calculator.divide(5, 0) } @@ -21,7 +21,7 @@ class CalculatorTest5 { } @Test - fun whenSquaringNumbers_thenCorrectAnswerGiven() { + fun `The square of a number should be equal to that number multiplied in itself`() { Assertions.assertAll( Executable { Assertions.assertEquals(1, calculator.square(1)) }, Executable { Assertions.assertEquals(4, calculator.square(2)) }, @@ -76,7 +76,7 @@ class CalculatorTest5 { Tag("logarithms") ) @Test - fun whenIcalculateLog2Of8_thenIget3() { + fun `Log to base 2 of 8 should be equal to 3`() { Assertions.assertEquals(3.0, calculator.log(2, 8)) } } diff --git a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt b/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt index 70d3fb90bf..15ff201430 100644 --- a/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt +++ b/core-kotlin/src/test/kotlin/com/baeldung/kotlin/junit5/SimpleTest5.kt @@ -5,15 +5,16 @@ import org.junit.jupiter.api.Disabled import org.junit.jupiter.api.Test class SimpleTest5 { + @Test - fun whenEmptyList_thenListIsEmpty() { + fun `isEmpty should return true for empty lists`() { val list = listOf() Assertions.assertTrue(list::isEmpty) } @Test @Disabled - fun when3equals4_thenTestFails() { + fun `3 is equal to 4`() { Assertions.assertEquals(3, 4) { "Three does not equal four" } diff --git a/couchbase/pom.xml b/couchbase/pom.xml index 7da027597e..994b80e7cd 100644 --- a/couchbase/pom.xml +++ b/couchbase/pom.xml @@ -5,9 +5,9 @@ com.baeldung couchbase 0.1-SNAPSHOT - jar couchbase Couchbase Tutorials + jar com.baeldung diff --git a/custom-pmd/pom.xml b/custom-pmd/pom.xml index 0f73282ae3..74e6d9593b 100644 --- a/custom-pmd/pom.xml +++ b/custom-pmd/pom.xml @@ -4,8 +4,8 @@ org.baeldung.pmd custom-pmd 0.0.1 - jar custom-pmd + jar http://maven.apache.org diff --git a/ddd/pom.xml b/ddd/pom.xml index a61ae24e92..749e444e52 100644 --- a/ddd/pom.xml +++ b/ddd/pom.xml @@ -1,6 +1,12 @@ 4.0.0 + com.baeldung.ddd + ddd + 0.0.1-SNAPSHOT + ddd + jar + DDD series examples org.springframework.boot @@ -9,18 +15,6 @@ - com.baeldung.ddd - ddd - 0.0.1-SNAPSHOT - jar - ddd - DDD series examples - - - 1.0.1 - 2.22.0 - - org.springframework.boot @@ -88,4 +82,10 @@ test + + + 1.0.1 + 2.22.0 + + \ No newline at end of file diff --git a/deeplearning4j/pom.xml b/deeplearning4j/pom.xml index 38be189bd0..181dbc871c 100644 --- a/deeplearning4j/pom.xml +++ b/deeplearning4j/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung.deeplearning4j deeplearning4j - jar 1.0-SNAPSHOT deeplearning4j + jar com.baeldung diff --git a/disruptor/pom.xml b/disruptor/pom.xml index c26dcc0cd4..296704f546 100644 --- a/disruptor/pom.xml +++ b/disruptor/pom.xml @@ -4,8 +4,8 @@ com.baeldung disruptor 0.1.0-SNAPSHOT - jar disruptor + jar com.baeldung diff --git a/flyway-cdi-extension/pom.xml b/flyway-cdi-extension/pom.xml index dbb32f1e5a..f49a51ea4b 100644 --- a/flyway-cdi-extension/pom.xml +++ b/flyway-cdi-extension/pom.xml @@ -8,44 +8,49 @@ 1.0-SNAPSHOT flyway-cdi-extension - - 1.8 - 1.8 - - javax.enterprise cdi-api - 2.0.SP1 + ${cdi-api.version} org.jboss.weld.se weld-se-core - 3.0.5.Final + ${weld-se-core.version} runtime org.flywaydb flyway-core - 5.1.4 + ${flyway-core.version} org.apache.tomcat tomcat-jdbc - 8.5.33 + ${tomcat-jdbc.version} javax.annotation javax.annotation-api - 1.3.2 + ${javax.annotation-api.version} com.h2database h2 - 1.4.197 + ${h2.version} runtime + + 1.8 + 1.8 + 2.0.SP1 + 3.0.5.Final + 5.1.4 + 8.5.33 + 1.3.2 + 1.4.197 + diff --git a/geotools/pom.xml b/geotools/pom.xml index 3ac8a63564..f2a9a77d2a 100644 --- a/geotools/pom.xml +++ b/geotools/pom.xml @@ -4,8 +4,8 @@ 4.0.0 geotools 0.0.1-SNAPSHOT - jar geotools + jar http://maven.apache.org diff --git a/google-cloud/pom.xml b/google-cloud/pom.xml index 85f47cc2f5..e39e186f05 100644 --- a/google-cloud/pom.xml +++ b/google-cloud/pom.xml @@ -4,9 +4,9 @@ 4.0.0 google-cloud 0.1-SNAPSHOT - jar google-cloud Google Cloud Tutorials + jar com.baeldung diff --git a/google-web-toolkit/pom.xml b/google-web-toolkit/pom.xml index db9ce2eac0..f4c6a0ab39 100644 --- a/google-web-toolkit/pom.xml +++ b/google-web-toolkit/pom.xml @@ -7,9 +7,9 @@ 4.0.0 com.baeldung google-web-toolkit - war 1.0-SNAPSHOT google-web-toolkit + war com.baeldung @@ -23,7 +23,7 @@ com.google.gwt gwt - 2.8.2 + ${gwt.version} pom import @@ -49,7 +49,7 @@ junit junit - 4.11 + ${junit.version} test @@ -120,6 +120,8 @@ UTF-8 UTF-8 + 4.11 + 2.8.2 diff --git a/grpc/pom.xml b/grpc/pom.xml index 725bec3e70..ab550c31d7 100644 --- a/grpc/pom.xml +++ b/grpc/pom.xml @@ -3,8 +3,8 @@ 4.0.0 grpc 0.0.1-SNAPSHOT - jar grpc + jar com.baeldung diff --git a/guice/pom.xml b/guice/pom.xml index 0aea662d64..8ed2b557dc 100644 --- a/guice/pom.xml +++ b/guice/pom.xml @@ -1,45 +1,29 @@ - - 4.0.0 - com.baeldung.examples.guice - guice - 1.0-SNAPSHOT - jar - guice + + 4.0.0 + com.baeldung.examples.guice + guice + 1.0-SNAPSHOT + guice + jar - - com.baeldung - parent-modules - 1.0.0-SNAPSHOT - + + com.baeldung + parent-modules + 1.0.0-SNAPSHOT + - - - com.google.inject - guice - ${guice.version} - + + + com.google.inject + guice + ${guice.version} + + - - org.springframework - spring-context - ${spring.version} - + + 4.1.0 + - - org.springframework - spring-test - ${springtest.version} - test - - - - - 4.2.2 - 5.1.3.RELEASE - 5.1.3.RELEASE - - - + \ No newline at end of file diff --git a/guice/src/main/java/com/baeldung/examples/common/Account.java b/guice/src/main/java/com/baeldung/examples/common/Account.java index 8f8b5059c5..fd2df005ac 100644 --- a/guice/src/main/java/com/baeldung/examples/common/Account.java +++ b/guice/src/main/java/com/baeldung/examples/common/Account.java @@ -1,8 +1,5 @@ package com.baeldung.examples.common; -import org.springframework.stereotype.Component; - -@Component public class Account { private String accountNumber; diff --git a/guice/src/main/java/com/baeldung/examples/common/AccountServiceImpl.java b/guice/src/main/java/com/baeldung/examples/common/AccountServiceImpl.java index 969c106d5b..18d6777c4a 100644 --- a/guice/src/main/java/com/baeldung/examples/common/AccountServiceImpl.java +++ b/guice/src/main/java/com/baeldung/examples/common/AccountServiceImpl.java @@ -1,8 +1,5 @@ package com.baeldung.examples.common; -import org.springframework.stereotype.Component; - -@Component public class AccountServiceImpl implements AccountService { } diff --git a/guice/src/main/java/com/baeldung/examples/common/BookServiceImpl.java b/guice/src/main/java/com/baeldung/examples/common/BookServiceImpl.java index 01f968bbe9..aee0d22e51 100644 --- a/guice/src/main/java/com/baeldung/examples/common/BookServiceImpl.java +++ b/guice/src/main/java/com/baeldung/examples/common/BookServiceImpl.java @@ -1,10 +1,7 @@ package com.baeldung.examples.common; -import org.springframework.beans.factory.annotation.Autowired; - public class BookServiceImpl implements BookService { - @Autowired(required = false) private AuthorService authorService; } diff --git a/guice/src/main/java/com/baeldung/examples/common/PersonDaoImpl.java b/guice/src/main/java/com/baeldung/examples/common/PersonDaoImpl.java index 971db5aa87..ecbf198cc0 100644 --- a/guice/src/main/java/com/baeldung/examples/common/PersonDaoImpl.java +++ b/guice/src/main/java/com/baeldung/examples/common/PersonDaoImpl.java @@ -1,8 +1,5 @@ package com.baeldung.examples.common; -import org.springframework.stereotype.Component; - -@Component public class PersonDaoImpl implements PersonDao { } \ No newline at end of file diff --git a/guice/src/main/java/com/baeldung/examples/guice/FooProcessor.java b/guice/src/main/java/com/baeldung/examples/guice/FooProcessor.java index f0cba31d9a..929013cd2b 100644 --- a/guice/src/main/java/com/baeldung/examples/guice/FooProcessor.java +++ b/guice/src/main/java/com/baeldung/examples/guice/FooProcessor.java @@ -1,12 +1,9 @@ package com.baeldung.examples.guice; -import org.springframework.lang.Nullable; - import com.google.inject.Inject; public class FooProcessor { @Inject - @Nullable private Foo foo; } \ No newline at end of file diff --git a/guice/src/main/java/com/baeldung/examples/guice/modules/GuiceModule.java b/guice/src/main/java/com/baeldung/examples/guice/modules/GuiceModule.java index 6a380e922b..fbcd36b56a 100644 --- a/guice/src/main/java/com/baeldung/examples/guice/modules/GuiceModule.java +++ b/guice/src/main/java/com/baeldung/examples/guice/modules/GuiceModule.java @@ -27,7 +27,7 @@ public class GuiceModule extends AbstractModule { // }); bind(Foo.class).toProvider(new Provider() { public Foo get() { - return null; + return new Foo(); } }); bind(PersonDao.class).to(PersonDaoImpl.class); diff --git a/jackson/README.md b/jackson/README.md index 04e88d0ea1..e201a06727 100644 --- a/jackson/README.md +++ b/jackson/README.md @@ -37,3 +37,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Serialize Only Fields that meet a Custom Criteria with Jackson](http://www.baeldung.com/jackson-serialize-field-custom-criteria) - [Mapping Nested Values with Jackson](http://www.baeldung.com/jackson-nested-values) - [Convert XML to JSON Using Jackson](https://www.baeldung.com/jackson-convert-xml-json) +- [Deserialize Immutable Objects with Jackson](https://www.baeldung.com/jackson-deserialize-immutable-objects) diff --git a/java-collections-conversions/pom.xml b/java-collections-conversions/pom.xml index 9b54652001..ee7221b25e 100644 --- a/java-collections-conversions/pom.xml +++ b/java-collections-conversions/pom.xml @@ -3,8 +3,8 @@ 4.0.0 java-collections-conversions 0.1.0-SNAPSHOT - jar java-collections-conversions + jar com.baeldung diff --git a/java-collections-maps/README.md b/java-collections-maps/README.md index b4ab270448..5d65e961de 100644 --- a/java-collections-maps/README.md +++ b/java-collections-maps/README.md @@ -19,3 +19,4 @@ - [How to Check If a Key Exists in a Map](https://www.baeldung.com/java-map-key-exists) - [Comparing Two HashMaps in Java](https://www.baeldung.com/java-compare-hashmaps) - [Immutable Map Implementations in Java](https://www.baeldung.com/java-immutable-maps) +- [Map to String Conversion in Java](https://www.baeldung.com/java-map-to-string-conversion) diff --git a/java-collections-maps/pom.xml b/java-collections-maps/pom.xml index 0803866c51..b5eba31437 100644 --- a/java-collections-maps/pom.xml +++ b/java-collections-maps/pom.xml @@ -3,8 +3,8 @@ 4.0.0 java-collections-maps 0.1.0-SNAPSHOT - jar java-collections-maps + jar com.baeldung @@ -39,7 +39,7 @@ one.util streamex - 0.6.5 + ${streamex.version} @@ -50,5 +50,6 @@ 1.7.0 3.6.1 7.1.0 + 0.6.5 diff --git a/java-dates/README.md b/java-dates/README.md index ac3166d938..8171e5def9 100644 --- a/java-dates/README.md +++ b/java-dates/README.md @@ -27,4 +27,5 @@ - [Convert Between java.time.Instant and java.sql.Timestamp](https://www.baeldung.com/java-time-instant-to-java-sql-timestamp) - [Convert between String and Timestamp](https://www.baeldung.com/java-string-to-timestamp) - [A Guide to SimpleDateFormat](https://www.baeldung.com/java-simple-date-format) -- [ZoneOffset in Java](https://www.baeldung.com/java-zone-offset) \ No newline at end of file +- [ZoneOffset in Java](https://www.baeldung.com/java-zone-offset) +- [Differences Between ZonedDateTime and OffsetDateTime](https://www.baeldung.com/java-zoneddatetime-offsetdatetime) diff --git a/java-dates/pom.xml b/java-dates/pom.xml index 2618fad1d4..8dd5ad675e 100644 --- a/java-dates/pom.xml +++ b/java-dates/pom.xml @@ -4,8 +4,8 @@ com.baeldung java-dates 0.1.0-SNAPSHOT - jar java-dates + jar com.baeldung diff --git a/java-numbers/pom.xml b/java-numbers/pom.xml index 0f5140ea5e..eb75f85bf0 100644 --- a/java-numbers/pom.xml +++ b/java-numbers/pom.xml @@ -4,8 +4,8 @@ 4.0.0 java-numbers 0.1.0-SNAPSHOT - jar java-numbers + jar com.baeldung @@ -13,6 +13,7 @@ 0.0.1-SNAPSHOT ../parent-java + log4j diff --git a/java-streams/README.md b/java-streams/README.md index f2afd570f6..15ea1c742a 100644 --- a/java-streams/README.md +++ b/java-streams/README.md @@ -16,3 +16,4 @@ - [Introduction to Protonpack](https://www.baeldung.com/java-protonpack) - [Java Stream Filter with Lambda Expression](https://www.baeldung.com/java-stream-filter-lambda) - [Counting Matches on a Stream Filter](https://www.baeldung.com/java-stream-filter-count) +- [Java 8 Streams peek() API](https://www.baeldung.com/java-streams-peek-api) diff --git a/java-streams/pom.xml b/java-streams/pom.xml index 2b52ebb4b3..0de1a424d6 100644 --- a/java-streams/pom.xml +++ b/java-streams/pom.xml @@ -3,8 +3,8 @@ 4.0.0 java-streams 0.1.0-SNAPSHOT - jar java-streams + jar com.baeldung @@ -94,10 +94,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + ${maven-compiler-plugin.version} - 1.8 - 1.8 + ${maven.compiler.source} + ${maven.compiler.target} -parameters @@ -117,5 +117,8 @@ 3.11.1 1.8.9 + 3.1 + 1.8 + 1.8 diff --git a/java-strings/README.md b/java-strings/README.md index b72a378d06..1ab5e098f6 100644 --- a/java-strings/README.md +++ b/java-strings/README.md @@ -50,3 +50,6 @@ - [Remove Leading and Trailing Characters from a String](https://www.baeldung.com/java-remove-trailing-characters) - [Concatenating Strings In Java](https://www.baeldung.com/java-strings-concatenation) - [Java toString() Method](https://www.baeldung.com/java-tostring) +- [Java String Interview Questions and Answers](https://www.baeldung.com/java-string-interview-questions) +- [Check if a String is a Pangram in Java](https://www.baeldung.com/java-string-pangram) +- [Check If a String Contains Multiple Keywords](https://www.baeldung.com/string-contains-multiple-words) diff --git a/java-strings/pom.xml b/java-strings/pom.xml index 9f89ed6d76..4555b8ad4a 100755 --- a/java-strings/pom.xml +++ b/java-strings/pom.xml @@ -66,20 +66,20 @@ com.vdurmont emoji-java - 4.0.0 + ${emoji-java.version} org.junit.jupiter junit-jupiter-api - 5.3.1 + ${junit-jupiter-api.version} test org.hamcrest hamcrest-library - 1.3 + ${hamcrest-library.version} test @@ -87,18 +87,18 @@ org.passay passay - 1.3.1 + ${passay.version} org.apache.commons commons-text - 1.4 + ${commons-text.version} org.ahocorasick ahocorasick - 0.4.0 + ${ahocorasick.version} @@ -116,10 +116,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + ${maven-compiler-plugin.version} - 1.8 - 1.8 + ${java.version} + ${java.version} -parameters @@ -135,6 +135,12 @@ 1.19 61.1 27.0.1-jre + 4.0.0 + 5.3.1 + 1.3 + 1.3.1 + 1.4 + 0.4.0 diff --git a/javax-servlets/pom.xml b/javax-servlets/pom.xml index f00dd0ebe8..bf85feb7ce 100644 --- a/javax-servlets/pom.xml +++ b/javax-servlets/pom.xml @@ -80,6 +80,7 @@ test + 4.5.3 5.0.5.RELEASE diff --git a/javaxval/pom.xml b/javaxval/pom.xml index 5f2690b5b4..f31aa0dc77 100644 --- a/javaxval/pom.xml +++ b/javaxval/pom.xml @@ -50,6 +50,7 @@ test + 2.0.1.Final 6.0.13.Final diff --git a/jee-7-security/pom.xml b/jee-7-security/pom.xml index 622ca19903..5b7bb07239 100644 --- a/jee-7-security/pom.xml +++ b/jee-7-security/pom.xml @@ -4,8 +4,8 @@ 4.0.0 jee-7-security 1.0-SNAPSHOT - war jee-7-security + war JavaEE 7 Spring Security Application @@ -56,7 +56,7 @@ javax.mvc javax.mvc-api - 1.0-pr + ${javax.mvc-api.version} @@ -97,6 +97,7 @@ 2.2 1.1.2 4.2.3.RELEASE + 1.0-pr diff --git a/jee-7/pom.xml b/jee-7/pom.xml index 97ed2cc51d..62ccb9d313 100644 --- a/jee-7/pom.xml +++ b/jee-7/pom.xml @@ -128,52 +128,52 @@ org.jboss.spec.javax.batch jboss-batch-api_1.0_spec - 1.0.0.Final + ${jboss-batch-api.version} org.jberet jberet-core - 1.0.2.Final + ${jberet.version} org.jberet jberet-support - 1.0.2.Final + ${jberet.version} org.jboss.spec.javax.transaction jboss-transaction-api_1.2_spec - 1.0.0.Final + ${jboss-transaction-api.version} org.jboss.marshalling jboss-marshalling - 1.4.2.Final + ${jboss-marshalling.version} org.jboss.weld weld-core - 2.1.1.Final + ${weld.version} org.jboss.weld.se weld-se - 2.1.1.Final + ${weld.version} org.jberet jberet-se - 1.0.2.Final + ${jberet.version} com.h2database h2 - 1.4.178 + ${h2.version} org.glassfish.jersey.containers jersey-container-jetty-servlet - 2.22.1 + ${jersey-container-jetty-servlet.version} @@ -533,6 +533,13 @@ 1.2 2.2 20160715 + 1.0.0.Final + 1.0.2.Final + 1.0.0.Final + 1.4.2.Final + 2.1.1.Final + 1.4.178 + 2.22.1 - \ No newline at end of file + diff --git a/jgroups/pom.xml b/jgroups/pom.xml index 34bdd59919..e95fe2be3c 100644 --- a/jgroups/pom.xml +++ b/jgroups/pom.xml @@ -4,9 +4,9 @@ 4.0.0 jgroups 0.1-SNAPSHOT - jar jgroups Reliable Messaging with JGroups Tutorial + jar com.baeldung diff --git a/jhipster/jhipster-microservice/car-app/pom.xml b/jhipster/jhipster-microservice/car-app/pom.xml index b05979b9c5..529877d448 100644 --- a/jhipster/jhipster-microservice/car-app/pom.xml +++ b/jhipster/jhipster-microservice/car-app/pom.xml @@ -1,6 +1,10 @@ 4.0.0 + com.car.app + car-app + car-app + war jhipster-microservice @@ -8,94 +12,10 @@ 1.0.0-SNAPSHOT - com.car.app - car-app - war - car-app - ${maven.version} - - -Djava.security.egd=file:/dev/./urandom -Xmx256m - 3.6.2 - 2.0.0 - 2.5 - 3.5 - 0.4.13 - 1.2 - 5.2.8.Final - 2.6.0 - 0.7.9 - 1.8 - 3.21.0-GA - 1.0.0 - 1.1.0 - 0.7.0 - 3.6 - 2.0.0 - 3.6.2 - 4.8 - jdt_apt - 1.1.0.Final - 2.10 - 1.4.1 - 3.0.1 - yyyyMMddHHmmss - 3.0.0 - 3.1.3 - v6.10.0 - - - - - ${project.build.directory}/test-results - 0.0.20 - false - 3.2.2 - 2.12.1 - 3.2 - - src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* - - S3437,UndocumentedApi,BoldAndItalicTagsCheck - - - src/main/webapp/app/**/*.* - Web:BoldAndItalicTagsCheck - - src/main/java/**/* - squid:S3437 - - src/main/java/**/* - squid:UndocumentedApi - - ${project.testresult.directory}/coverage/jacoco/jacoco-it.exec - ${project.testresult.directory}/coverage/jacoco/jacoco.exec - jacoco - - ${project.testresult.directory}/karma - - ${project.testresult.directory}/coverage/report-lcov/lcov.info - - ${project.testresult.directory}/coverage/report-lcov/lcov.info - - ${project.basedir}/src/main/ - ${project.testresult.directory}/surefire-reports - ${project.basedir}/src/test/ - - 2.5.0 - - Camden.SR5 - 2.6.1 - 1.4.10.Final - 1.1.0.Final - v0.21.3 - - @@ -898,4 +818,84 @@ + + + -Djava.security.egd=file:/dev/./urandom -Xmx256m + 3.6.2 + 2.0.0 + 2.5 + 3.5 + 0.4.13 + 1.2 + 5.2.8.Final + 2.6.0 + 0.7.9 + 1.8 + 3.21.0-GA + 1.0.0 + 1.1.0 + 0.7.0 + 3.6 + 2.0.0 + 3.6.2 + 4.8 + jdt_apt + 1.1.0.Final + 2.10 + 1.4.1 + 3.0.1 + yyyyMMddHHmmss + 3.0.0 + 3.1.3 + v6.10.0 + + + + + ${project.build.directory}/test-results + 0.0.20 + false + 3.2.2 + 2.12.1 + 3.2 + + src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + + S3437,UndocumentedApi,BoldAndItalicTagsCheck + + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + ${project.testresult.directory}/coverage/jacoco/jacoco-it.exec + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + + ${project.testresult.directory}/karma + + ${project.testresult.directory}/coverage/report-lcov/lcov.info + + ${project.testresult.directory}/coverage/report-lcov/lcov.info + + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + 2.5.0 + + Camden.SR5 + 2.6.1 + 1.4.10.Final + 1.1.0.Final + v0.21.3 + + diff --git a/jhipster/jhipster-microservice/dealer-app/pom.xml b/jhipster/jhipster-microservice/dealer-app/pom.xml index 803a0f62e6..1eac8a930e 100644 --- a/jhipster/jhipster-microservice/dealer-app/pom.xml +++ b/jhipster/jhipster-microservice/dealer-app/pom.xml @@ -1,6 +1,10 @@ 4.0.0 + com.dealer.app + dealer-app + dealer-app + war jhipster-microservice @@ -8,93 +12,10 @@ 1.0.0-SNAPSHOT - com.dealer.app - dealer-app - war - dealer-app - ${maven.version} - - -Djava.security.egd=file:/dev/./urandom -Xmx256m - 3.6.2 - 2.0.0 - 2.5 - 3.5 - 0.4.13 - 1.2 - 5.2.8.Final - 2.6.0 - 0.7.9 - 3.21.0-GA - 1.0.0 - 1.1.0 - 0.7.0 - 3.6 - 2.0.0 - 3.6.2 - 4.8 - jdt_apt - 1.1.0.Final - 2.10 - 1.4.1 - 3.0.1 - yyyyMMddHHmmss - 3.0.0 - 3.1.3 - v6.10.0 - - - - - ${project.build.directory}/test-results - 0.0.20 - false - 3.2.2 - 2.12.1 - 3.2 - - src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* - - S3437,UndocumentedApi,BoldAndItalicTagsCheck - - - src/main/webapp/app/**/*.* - Web:BoldAndItalicTagsCheck - - src/main/java/**/* - squid:S3437 - - src/main/java/**/* - squid:UndocumentedApi - - ${project.testresult.directory}/coverage/jacoco/jacoco-it.exec - ${project.testresult.directory}/coverage/jacoco/jacoco.exec - jacoco - - ${project.testresult.directory}/karma - - ${project.testresult.directory}/coverage/report-lcov/lcov.info - - ${project.testresult.directory}/coverage/report-lcov/lcov.info - - ${project.basedir}/src/main/ - ${project.testresult.directory}/surefire-reports - ${project.basedir}/src/test/ - - 2.5.0 - - Camden.SR5 - 2.6.1 - 1.4.10.Final - 1.1.0.Final - v0.21.3 - - @@ -892,5 +813,83 @@ + + + -Djava.security.egd=file:/dev/./urandom -Xmx256m + 3.6.2 + 2.0.0 + 2.5 + 3.5 + 0.4.13 + 1.2 + 5.2.8.Final + 2.6.0 + 0.7.9 + 3.21.0-GA + 1.0.0 + 1.1.0 + 0.7.0 + 3.6 + 2.0.0 + 3.6.2 + 4.8 + jdt_apt + 1.1.0.Final + 2.10 + 1.4.1 + 3.0.1 + yyyyMMddHHmmss + 3.0.0 + 3.1.3 + v6.10.0 + + + + + ${project.build.directory}/test-results + 0.0.20 + false + 3.2.2 + 2.12.1 + 3.2 + src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + + S3437,UndocumentedApi,BoldAndItalicTagsCheck + + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + ${project.testresult.directory}/coverage/jacoco/jacoco-it.exec + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + + ${project.testresult.directory}/karma + + ${project.testresult.directory}/coverage/report-lcov/lcov.info + + ${project.testresult.directory}/coverage/report-lcov/lcov.info + + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + 2.5.0 + + Camden.SR5 + 2.6.1 + 1.4.10.Final + 1.1.0.Final + v0.21.3 + + diff --git a/jhipster/jhipster-microservice/gateway-app/pom.xml b/jhipster/jhipster-microservice/gateway-app/pom.xml index ed0c929027..babc9e4f24 100644 --- a/jhipster/jhipster-microservice/gateway-app/pom.xml +++ b/jhipster/jhipster-microservice/gateway-app/pom.xml @@ -1,6 +1,10 @@ 4.0.0 + com.gateway + gateway-app + gateway-app + war jhipster-microservice @@ -8,97 +12,10 @@ 1.0.0-SNAPSHOT - com.gateway - gateway-app - war - gateway-app - ${maven.version} - - -Djava.security.egd=file:/dev/./urandom -Xmx256m - 3.6.2 - 2.0.0 - 3.6.0 - 1.10 - 2.5 - 3.5 - 0.4.13 - 1.3 - 1.2 - 5.2.8.Final - 2.6.0 - 0.7.9 - 3.21.0-GA - 1.0.0 - 1.1.0 - 0.7.0 - 3.6 - 2.0.0 - 3.6.2 - 4.8 - 1.3.0 - jdt_apt - 1.1.0.Final - 2.10 - 1.4.1 - 3.0.1 - yyyyMMddHHmmss - 3.0.0 - 3.1.3 - v6.10.0 - - - - - ${project.build.directory}/test-results - 0.0.20 - false - 3.2.2 - 2.12.1 - 3.2 - - src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* - - S3437,UndocumentedApi,BoldAndItalicTagsCheck - - - src/main/webapp/app/**/*.* - Web:BoldAndItalicTagsCheck - - src/main/java/**/* - squid:S3437 - - src/main/java/**/* - squid:UndocumentedApi - - ${project.testresult.directory}/coverage/jacoco/jacoco-it.exec - ${project.testresult.directory}/coverage/jacoco/jacoco.exec - jacoco - - ${project.testresult.directory}/karma - - ${project.testresult.directory}/coverage/report-lcov/lcov.info - - ${project.testresult.directory}/coverage/report-lcov/lcov.info - - ${project.basedir}/src/main/ - ${project.testresult.directory}/surefire-reports - ${project.basedir}/src/test/ - - 2.5.0 - - Camden.SR5 - 2.6.1 - 1.4.10.Final - 1.1.0.Final - v0.21.3 - - @@ -1008,5 +925,87 @@ + + + -Djava.security.egd=file:/dev/./urandom -Xmx256m + 3.6.2 + 2.0.0 + 3.6.0 + 1.10 + 2.5 + 3.5 + 0.4.13 + 1.3 + 1.2 + 5.2.8.Final + 2.6.0 + 0.7.9 + 3.21.0-GA + 1.0.0 + 1.1.0 + 0.7.0 + 3.6 + 2.0.0 + 3.6.2 + 4.8 + 1.3.0 + jdt_apt + 1.1.0.Final + 2.10 + 1.4.1 + 3.0.1 + yyyyMMddHHmmss + 3.0.0 + 3.1.3 + v6.10.0 + + + + + ${project.build.directory}/test-results + 0.0.20 + false + 3.2.2 + 2.12.1 + 3.2 + + src/main/webapp/content/**/*.*, src/main/webapp/bower_components/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + + S3437,UndocumentedApi,BoldAndItalicTagsCheck + + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + ${project.testresult.directory}/coverage/jacoco/jacoco-it.exec + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + + ${project.testresult.directory}/karma + + ${project.testresult.directory}/coverage/report-lcov/lcov.info + + ${project.testresult.directory}/coverage/report-lcov/lcov.info + + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + 2.5.0 + + Camden.SR5 + 2.6.1 + 1.4.10.Final + 1.1.0.Final + v0.21.3 + diff --git a/jhipster/jhipster-uaa/gateway/pom.xml b/jhipster/jhipster-uaa/gateway/pom.xml index 52f84e4006..0f815bedad 100644 --- a/jhipster/jhipster-uaa/gateway/pom.xml +++ b/jhipster/jhipster-uaa/gateway/pom.xml @@ -1,12 +1,11 @@ 4.0.0 - com.baeldung.jhipster.gateway gateway 0.0.1-SNAPSHOT - war Gateway + war @@ -14,87 +13,6 @@ - - - 3.0.0 - 1.8 - 2.12.6 - v8.12.0 - 6.4.1 - UTF-8 - UTF-8 - ${project.build.directory}/test-results - yyyyMMddHHmmss - ${java.version} - ${java.version} - -Djava.security.egd=file:/dev/./urandom -Xmx256m - jdt_apt - false - - - - - - - 2.0.25 - - 2.0.5.RELEASE - - 5.2.17.Final - - 3.22.0-GA - - 3.5.5 - 3.6 - 2.0.1.Final - 1.2.0.Final - - - 3.1.0 - 3.8.0 - 2.10 - 3.0.0-M2 - 3.1.0 - 2.22.0 - 3.2.2 - 0.9.11 - 1.6 - 0.8.2 - 3.4.2 - 3.5.0.1254 - 2.2.5 - - - http://localhost:9001 - src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* - S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck - - src/main/webapp/app/**/*.* - Web:BoldAndItalicTagsCheck - - src/main/java/**/* - squid:S3437 - - src/main/java/**/* - squid:UndocumentedApi - - src/main/java/**/* - squid:S4684 - ${project.testresult.directory}/coverage/jacoco/jacoco.exec - jacoco - ${project.testresult.directory}/jest/TESTS-results-sonar.xml - ${project.testresult.directory}/lcov.info - ${project.basedir}/src/main/ - ${project.testresult.directory}/surefire-reports - ${project.basedir}/src/test/ - - - - @@ -1092,4 +1010,85 @@ + + + + 3.0.0 + 1.8 + 2.12.6 + v8.12.0 + 6.4.1 + UTF-8 + UTF-8 + ${project.build.directory}/test-results + yyyyMMddHHmmss + ${java.version} + ${java.version} + -Djava.security.egd=file:/dev/./urandom -Xmx256m + jdt_apt + false + + + + + + + 2.0.25 + + 2.0.5.RELEASE + + 5.2.17.Final + + 3.22.0-GA + + 3.5.5 + 3.6 + 2.0.1.Final + 1.2.0.Final + + + 3.1.0 + 3.8.0 + 2.10 + 3.0.0-M2 + 3.1.0 + 2.22.0 + 3.2.2 + 0.9.11 + 1.6 + 0.8.2 + 3.4.2 + 3.5.0.1254 + 2.2.5 + + + http://localhost:9001 + src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + src/main/java/**/* + squid:S4684 + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + ${project.testresult.directory}/jest/TESTS-results-sonar.xml + ${project.testresult.directory}/lcov.info + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + + diff --git a/jhipster/jhipster-uaa/pom.xml b/jhipster/jhipster-uaa/pom.xml index e8ccaabfb0..88df59b735 100644 --- a/jhipster/jhipster-uaa/pom.xml +++ b/jhipster/jhipster-uaa/pom.xml @@ -4,8 +4,8 @@ 4.0.0 com.baeldung.jhipster jhipster-microservice-uaa - pom JHipster Microservice with UAA + pom jhipster diff --git a/jhipster/jhipster-uaa/quotes/pom.xml b/jhipster/jhipster-uaa/quotes/pom.xml index 9984f009ff..81ab23471f 100644 --- a/jhipster/jhipster-uaa/quotes/pom.xml +++ b/jhipster/jhipster-uaa/quotes/pom.xml @@ -1,12 +1,11 @@ 4.0.0 - com.baeldung.jhipster.quotes quotes 0.0.1-SNAPSHOT - war Quotes + war @@ -14,85 +13,6 @@ - - - 3.0.0 - 1.8 - 2.12.6 - v8.12.0 - 6.4.1 - UTF-8 - UTF-8 - ${project.build.directory}/test-results - yyyyMMddHHmmss - ${java.version} - ${java.version} - -Djava.security.egd=file:/dev/./urandom -Xmx256m - jdt_apt - false - - - - - - - 2.0.25 - - 2.0.5.RELEASE - - 5.2.17.Final - - 3.22.0-GA - - 3.5.5 - 3.6 - 2.0.1.Final - 1.2.0.Final - - - 3.1.0 - 3.8.0 - 2.10 - 3.0.0-M2 - 3.1.0 - 2.22.0 - 3.2.2 - 0.9.11 - 0.8.2 - 3.4.2 - 3.5.0.1254 - 2.2.5 - - - http://localhost:9001 - src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* - S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck - - src/main/webapp/app/**/*.* - Web:BoldAndItalicTagsCheck - - src/main/java/**/* - squid:S3437 - - src/main/java/**/* - squid:UndocumentedApi - - src/main/java/**/* - squid:S4684 - ${project.testresult.directory}/coverage/jacoco/jacoco.exec - jacoco - ${project.testresult.directory}/lcov.info - ${project.basedir}/src/main/ - ${project.testresult.directory}/surefire-reports - ${project.basedir}/src/test/ - - - - @@ -912,4 +832,83 @@ + + + + 3.0.0 + 1.8 + 2.12.6 + v8.12.0 + 6.4.1 + UTF-8 + UTF-8 + ${project.build.directory}/test-results + yyyyMMddHHmmss + ${java.version} + ${java.version} + -Djava.security.egd=file:/dev/./urandom -Xmx256m + jdt_apt + false + + + + + + + 2.0.25 + + 2.0.5.RELEASE + + 5.2.17.Final + + 3.22.0-GA + + 3.5.5 + 3.6 + 2.0.1.Final + 1.2.0.Final + + + 3.1.0 + 3.8.0 + 2.10 + 3.0.0-M2 + 3.1.0 + 2.22.0 + 3.2.2 + 0.9.11 + 0.8.2 + 3.4.2 + 3.5.0.1254 + 2.2.5 + + + http://localhost:9001 + src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + src/main/java/**/* + squid:S4684 + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + ${project.testresult.directory}/lcov.info + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + + diff --git a/jhipster/jhipster-uaa/uaa/pom.xml b/jhipster/jhipster-uaa/uaa/pom.xml index 9c4783747a..2c4dd9d0f0 100644 --- a/jhipster/jhipster-uaa/uaa/pom.xml +++ b/jhipster/jhipster-uaa/uaa/pom.xml @@ -1,12 +1,11 @@ 4.0.0 - com.baeldung.jhipster.uaa uaa 0.0.1-SNAPSHOT - war Uaa + war @@ -14,85 +13,6 @@ - - - 3.0.0 - 1.8 - 2.12.6 - v8.12.0 - 6.4.1 - UTF-8 - UTF-8 - ${project.build.directory}/test-results - yyyyMMddHHmmss - ${java.version} - ${java.version} - -Djava.security.egd=file:/dev/./urandom -Xmx256m - jdt_apt - false - - - - - - - 2.0.25 - - 2.0.5.RELEASE - - 5.2.17.Final - - 3.22.0-GA - - 3.5.5 - 3.6 - 2.0.1.Final - 1.2.0.Final - - - 3.1.0 - 3.8.0 - 2.10 - 3.0.0-M2 - 3.1.0 - 2.22.0 - 3.2.2 - 0.9.11 - 0.8.2 - 3.4.2 - 3.5.0.1254 - 2.2.5 - - - http://localhost:9001 - src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* - S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck - - src/main/webapp/app/**/*.* - Web:BoldAndItalicTagsCheck - - src/main/java/**/* - squid:S3437 - - src/main/java/**/* - squid:UndocumentedApi - - src/main/java/**/* - squid:S4684 - ${project.testresult.directory}/coverage/jacoco/jacoco.exec - jacoco - ${project.testresult.directory}/lcov.info - ${project.basedir}/src/main/ - ${project.testresult.directory}/surefire-reports - ${project.basedir}/src/test/ - - - - @@ -912,4 +832,84 @@ + + + + 3.0.0 + 1.8 + 2.12.6 + v8.12.0 + 6.4.1 + UTF-8 + UTF-8 + ${project.build.directory}/test-results + yyyyMMddHHmmss + ${java.version} + ${java.version} + -Djava.security.egd=file:/dev/./urandom -Xmx256m + jdt_apt + false + + + + + + + 2.0.25 + + 2.0.5.RELEASE + + 5.2.17.Final + + 3.22.0-GA + + 3.5.5 + 3.6 + 2.0.1.Final + 1.2.0.Final + + + 3.1.0 + 3.8.0 + 2.10 + 3.0.0-M2 + 3.1.0 + 2.22.0 + 3.2.2 + 0.9.11 + 0.8.2 + 3.4.2 + 3.5.0.1254 + 2.2.5 + + + http://localhost:9001 + src/main/webapp/content/**/*.*, src/main/webapp/i18n/*.js, target/www/**/*.* + S3437,S4684,UndocumentedApi,BoldAndItalicTagsCheck + + src/main/webapp/app/**/*.* + Web:BoldAndItalicTagsCheck + + src/main/java/**/* + squid:S3437 + + src/main/java/**/* + squid:UndocumentedApi + + src/main/java/**/* + squid:S4684 + ${project.testresult.directory}/coverage/jacoco/jacoco.exec + jacoco + ${project.testresult.directory}/lcov.info + ${project.basedir}/src/main/ + ${project.testresult.directory}/surefire-reports + ${project.basedir}/src/test/ + + + + diff --git a/jhipster/pom.xml b/jhipster/pom.xml index 5132c6dc95..3fcc53b354 100644 --- a/jhipster/pom.xml +++ b/jhipster/pom.xml @@ -5,8 +5,8 @@ com.baeldung.jhipster jhipster 1.0.0-SNAPSHOT - pom JHipster + pom parent-boot-1 diff --git a/jib/pom.xml b/jib/pom.xml index ad4011c3c4..5c9f242a20 100644 --- a/jib/pom.xml +++ b/jib/pom.xml @@ -18,11 +18,7 @@ spring-boot-starter-web - - - 1.8 - - + @@ -32,7 +28,7 @@ com.google.cloud.tools jib-maven-plugin - 0.9.10 + ${jib-maven-plugin.version} registry.hub.docker.com/baeldungjib/jib-spring-boot-app @@ -42,4 +38,8 @@ + + 1.8 + 0.9.10 + diff --git a/jjwt/pom.xml b/jjwt/pom.xml index 6bf9f4426a..2d03543293 100644 --- a/jjwt/pom.xml +++ b/jjwt/pom.xml @@ -5,8 +5,8 @@ io.jsonwebtoken jjwt 0.0.1-SNAPSHOT - jar jjwt + jar Exercising the JJWT diff --git a/jmeter/pom.xml b/jmeter/pom.xml index 943b75e03b..514546987d 100644 --- a/jmeter/pom.xml +++ b/jmeter/pom.xml @@ -4,9 +4,9 @@ 4.0.0 jmeter 0.0.1-SNAPSHOT - jar jmeter Intro to Performance testing using JMeter + jar parent-boot-1 diff --git a/jmh/pom.xml b/jmh/pom.xml index 1e01809fe6..70a0a398d4 100644 --- a/jmh/pom.xml +++ b/jmh/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung jmh - jar 1.0-SNAPSHOT jmh + jar http://maven.apache.org diff --git a/json/pom.xml b/json/pom.xml index fce2d26db5..23955e5a75 100644 --- a/json/pom.xml +++ b/json/pom.xml @@ -32,17 +32,17 @@ org.json json - 20171018 + ${json.version} com.google.code.gson gson - 2.8.5 + ${gson.version} com.fasterxml.jackson.core jackson-databind - 2.9.7 + ${jackson-databind.version} javax.json.bind @@ -52,14 +52,14 @@ junit junit - 4.12 + ${junit.version} test org.glassfish javax.json - 1.1.2 + ${javax.version} org.eclipse @@ -81,6 +81,11 @@ 1.0 4.1 1.0.1 + 20171018 + 2.8.5 + 2.9.7 + 4.12 + 1.1.2 diff --git a/jta/pom.xml b/jta/pom.xml index 4754c1872b..038f1dc8d1 100644 --- a/jta/pom.xml +++ b/jta/pom.xml @@ -7,7 +7,6 @@ 1.0-SNAPSHOT jta jar - JEE JTA demo @@ -17,12 +16,6 @@ - - UTF-8 - UTF-8 - 1.8 - - org.springframework.boot @@ -46,7 +39,7 @@ org.hsqldb hsqldb - 2.4.1 + ${hsqldb.version} @@ -86,4 +79,11 @@ + + + UTF-8 + UTF-8 + 1.8 + 2.4.1 + diff --git a/kotlin-libraries/README.md b/kotlin-libraries/README.md index 4110bfe12e..5e2526e64e 100644 --- a/kotlin-libraries/README.md +++ b/kotlin-libraries/README.md @@ -9,3 +9,4 @@ - [Working with Dates in Kotlin](https://www.baeldung.com/kotlin-dates) - [Introduction to Arrow in Kotlin](https://www.baeldung.com/kotlin-arrow) - [Kotlin with Ktor](https://www.baeldung.com/kotlin-ktor) +- [REST API With Kotlin and Kovert](https://www.baeldung.com/kotlin-kovert) diff --git a/libraries-security/pom.xml b/libraries-security/pom.xml index 3077abc29c..ba51227ce0 100644 --- a/libraries-security/pom.xml +++ b/libraries-security/pom.xml @@ -23,7 +23,7 @@ org.springframework.security.oauth spring-security-oauth2 - 2.3.3.RELEASE + ${spring-security-oauth2.version} @@ -41,21 +41,21 @@ org.passay passay - 1.3.1 + ${passay.version} org.cryptacular cryptacular - 1.2.2 + ${cryptacular.version} - 4.12 2.0.4.RELEASE 5.6.0 + 2.3.3.RELEASE + 1.3.1 + 1.2.2 - - diff --git a/libraries-server/README.md b/libraries-server/README.md index 28f963ade8..75c12fd61a 100644 --- a/libraries-server/README.md +++ b/libraries-server/README.md @@ -7,3 +7,4 @@ - [Creating and Configuring Jetty 9 Server in Java](http://www.baeldung.com/jetty-java-programmatic) - [Testing Netty with EmbeddedChannel](http://www.baeldung.com/testing-netty-embedded-channel) - [MQTT Client in Java](https://www.baeldung.com/java-mqtt-client) +- [Guide to XMPP Smack Client](https://www.baeldung.com/xmpp-smack-chat-client) diff --git a/libraries-server/pom.xml b/libraries-server/pom.xml index f60e664fa7..b30b6137a1 100644 --- a/libraries-server/pom.xml +++ b/libraries-server/pom.xml @@ -5,16 +5,17 @@ 0.0.1-SNAPSHOT libraries-server - + com.baeldung parent-modules 1.0.0-SNAPSHOT - + + org.eclipse.paho org.eclipse.paho.client.mqttv3 - 1.2.0 + ${eclipse.paho.client.mqttv3.version} @@ -107,6 +108,7 @@ 4.12 8.5.24 4.3.1 + 1.2.0 \ No newline at end of file diff --git a/libraries/README.md b/libraries/README.md index b247caedda..378317778e 100644 --- a/libraries/README.md +++ b/libraries/README.md @@ -64,7 +64,8 @@ - [Exactly Once Processing in Kafka](https://www.baeldung.com/kafka-exactly-once) - [An Introduction to SuanShu](https://www.baeldung.com/suanshu) - [Implementing a FTP-Client in Java](http://www.baeldung.com/java-ftp-client) -- [Introduction to Functional Java](https://www.baeldung.com/java-functional-library +- [Introduction to Functional Java](https://www.baeldung.com/java-functional-library) +- [Intro to Derive4J](https://www.baeldung.com/derive4j) The libraries module contains examples related to small libraries that are relatively easy to use and does not require any separate module of its own. diff --git a/logging-modules/logback/pom.xml b/logging-modules/logback/pom.xml index ef7adbc3ea..845424af0c 100644 --- a/logging-modules/logback/pom.xml +++ b/logging-modules/logback/pom.xml @@ -4,9 +4,9 @@ http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - logback logback 0.1-SNAPSHOT + logback com.baeldung diff --git a/lombok-custom/pom.xml b/lombok-custom/pom.xml index 41bd042a5e..f016405fd6 100644 --- a/lombok-custom/pom.xml +++ b/lombok-custom/pom.xml @@ -2,34 +2,35 @@ - - parent-modules - com.baeldung - 1.0.0-SNAPSHOT - 4.0.0 lombok-custom 0.1-SNAPSHOT + + parent-modules + com.baeldung + 1.0.0-SNAPSHOT + + org.projectlombok lombok - 1.14.8 + ${lombok.version} provided org.kohsuke.metainf-services metainf-services - 1.8 + ${metainf-services.version} org.eclipse.jdt core - 3.3.0-v_771 + ${eclipse.jdt.core.version} @@ -54,5 +55,12 @@ + + + 1.14.8 + 1.8 + 3.3.0-v_771 + - \ No newline at end of file + + diff --git a/lombok/src/main/java/com/baeldung/lombok/getter/GetterLazy.java b/lombok/src/main/java/com/baeldung/lombok/getter/GetterLazy.java new file mode 100644 index 0000000000..5ac82a74d8 --- /dev/null +++ b/lombok/src/main/java/com/baeldung/lombok/getter/GetterLazy.java @@ -0,0 +1,36 @@ +package com.baeldung.lombok.getter; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +import lombok.Getter; + +public class GetterLazy { + + private static final String DELIMETER = ","; + + @Getter(lazy = true) + private final Map transactions = readTxnsFromFile(); + + private Map readTxnsFromFile() { + + final Map cache = new HashMap<>(); + List txnRows = readTxnListFromFile(); + + txnRows.forEach(s -> { + String[] txnIdValueTuple = s.split(DELIMETER); + cache.put(txnIdValueTuple[0], Long.parseLong(txnIdValueTuple[1])); + }); + + return cache; + } + + private List readTxnListFromFile() { + + // read large file + return Stream.of("file content here").collect(Collectors.toList()); + } +} diff --git a/maven-archetype/src/main/resources/archetype-resources/pom.xml b/maven-archetype/src/main/resources/archetype-resources/pom.xml index eb69f64626..a5c813652d 100644 --- a/maven-archetype/src/main/resources/archetype-resources/pom.xml +++ b/maven-archetype/src/main/resources/archetype-resources/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - ${groupId} ${artifactId} ${version} diff --git a/maven-polyglot/maven-polyglot-json-extension/pom.xml b/maven-polyglot/maven-polyglot-json-extension/pom.xml index fe1e025d1f..5b18529ec5 100644 --- a/maven-polyglot/maven-polyglot-json-extension/pom.xml +++ b/maven-polyglot/maven-polyglot-json-extension/pom.xml @@ -7,11 +7,6 @@ maven-polyglot-json-extension 1.0-SNAPSHOT maven-polyglot-json-extension - - - 1.8 - 1.8 - @@ -43,5 +38,10 @@ + + + 1.8 + 1.8 + \ No newline at end of file diff --git a/maven/versions-maven-plugin/original/pom.xml b/maven/versions-maven-plugin/original/pom.xml index 295c77b860..7608e4d168 100644 --- a/maven/versions-maven-plugin/original/pom.xml +++ b/maven/versions-maven-plugin/original/pom.xml @@ -6,10 +6,6 @@ versions-maven-plugin-example 0.0.1-SNAPSHOT - - 1.15 - - @@ -73,4 +69,8 @@ + + 1.15 + + \ No newline at end of file diff --git a/metrics/pom.xml b/metrics/pom.xml index d7d7a8a911..014931a957 100644 --- a/metrics/pom.xml +++ b/metrics/pom.xml @@ -66,7 +66,7 @@ org.springframework.boot spring-boot-starter-web - 2.0.7.RELEASE + ${spring-boot-starter-web.version} @@ -89,7 +89,7 @@ org.assertj assertj-core - 3.11.1 + ${assertj-core.version} test @@ -102,6 +102,8 @@ 0.12.0.RELEASE 2.9.1 0.57.1 + 2.0.7.RELEASE + 3.11.1 diff --git a/micronaut/pom.xml b/micronaut/pom.xml index aa69c77f73..2a8d135483 100644 --- a/micronaut/pom.xml +++ b/micronaut/pom.xml @@ -4,12 +4,6 @@ micronaut 0.1 micronaut - - - com.baeldung.micronaut.helloworld.server.ServerApplication - 1.0.0.RC2 - 1.8 - @@ -133,4 +127,10 @@ + + + com.baeldung.micronaut.helloworld.server.ServerApplication + 1.0.0.RC2 + 1.8 + diff --git a/mustache/pom.xml b/mustache/pom.xml index 1b89997996..027d62ebc4 100644 --- a/mustache/pom.xml +++ b/mustache/pom.xml @@ -3,8 +3,8 @@ 4.0.0 mustache - jar mustache + jar parent-boot-2 diff --git a/osgi/osgi-intro-sample-activator/pom.xml b/osgi/osgi-intro-sample-activator/pom.xml index 77d7198698..95ac1fc0fb 100644 --- a/osgi/osgi-intro-sample-activator/pom.xml +++ b/osgi/osgi-intro-sample-activator/pom.xml @@ -2,9 +2,9 @@ 4.0.0 + osgi-intro-sample-activator bundle - osgi-intro-sample-activator diff --git a/parent-java/pom.xml b/parent-java/pom.xml index 8f603b2d09..cb3e205871 100644 --- a/parent-java/pom.xml +++ b/parent-java/pom.xml @@ -4,9 +4,9 @@ com.baeldung parent-java 0.0.1-SNAPSHOT - pom parent-java Parent for all java modules + pom com.baeldung diff --git a/parent-kotlin/pom.xml b/parent-kotlin/pom.xml index 73c98e1a80..7a3a8b10ca 100644 --- a/parent-kotlin/pom.xml +++ b/parent-kotlin/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 parent-kotlin - pom parent-kotlin + pom Parent for all kotlin modules diff --git a/parent-spring-4/pom.xml b/parent-spring-4/pom.xml index 9b3c42599b..6cbcf3000e 100644 --- a/parent-spring-4/pom.xml +++ b/parent-spring-4/pom.xml @@ -4,8 +4,8 @@ com.baeldung parent-spring-4 0.0.1-SNAPSHOT - pom parent-spring-4 + pom Parent for all spring 4 core modules diff --git a/parent-spring-5/pom.xml b/parent-spring-5/pom.xml index 51a2c1fd1f..650305b7e2 100644 --- a/parent-spring-5/pom.xml +++ b/parent-spring-5/pom.xml @@ -4,9 +4,9 @@ com.baeldung parent-spring-5 0.0.1-SNAPSHOT - pom parent-spring-5 Parent for all spring 5 core modules + pom com.baeldung diff --git a/patterns/pom.xml b/patterns/pom.xml index bc1f5173e2..3c3bb6d5ea 100644 --- a/patterns/pom.xml +++ b/patterns/pom.xml @@ -17,6 +17,7 @@ front-controller intercepting-filter design-patterns + solid diff --git a/patterns/principles/solid/README.md b/patterns/principles/solid/README.md new file mode 100644 index 0000000000..e2d72ecd28 --- /dev/null +++ b/patterns/principles/solid/README.md @@ -0,0 +1,5 @@ +### Relevant Articles: + +- [A Guide to Solid Principles](https://www.baeldung.com/solid-principles) + + diff --git a/patterns/principles/solid/src/main/java/com/baeldung/d/Keyboard.java b/patterns/principles/solid/src/main/java/com/baeldung/d/Keyboard.java deleted file mode 100644 index acb50cedb4..0000000000 --- a/patterns/principles/solid/src/main/java/com/baeldung/d/Keyboard.java +++ /dev/null @@ -1,4 +0,0 @@ -package com.baeldung.d; - -public class Keyboard { -} diff --git a/patterns/principles/solid/pom.xml b/patterns/solid/pom.xml similarity index 53% rename from patterns/principles/solid/pom.xml rename to patterns/solid/pom.xml index 825c7730a5..2837504197 100644 --- a/patterns/principles/solid/pom.xml +++ b/patterns/solid/pom.xml @@ -3,21 +3,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 - com.baeldung - solid/artifactId> + solid 1.0-SNAPSHOT - - - - - junit - junit - 4.12 - test - - - + + com.baeldung + patterns + 1.0.0-SNAPSHOT + .. + diff --git a/patterns/solid/src/main/java/com/baeldung/d/Keyboard.java b/patterns/solid/src/main/java/com/baeldung/d/Keyboard.java new file mode 100644 index 0000000000..cc6fc47d65 --- /dev/null +++ b/patterns/solid/src/main/java/com/baeldung/d/Keyboard.java @@ -0,0 +1,4 @@ +package com.baeldung.d; + +public interface Keyboard { +} diff --git a/patterns/principles/solid/src/main/java/com/baeldung/d/Monitor.java b/patterns/solid/src/main/java/com/baeldung/d/Monitor.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/d/Monitor.java rename to patterns/solid/src/main/java/com/baeldung/d/Monitor.java diff --git a/patterns/solid/src/main/java/com/baeldung/d/StandardKeyboard.java b/patterns/solid/src/main/java/com/baeldung/d/StandardKeyboard.java new file mode 100644 index 0000000000..cb0e229943 --- /dev/null +++ b/patterns/solid/src/main/java/com/baeldung/d/StandardKeyboard.java @@ -0,0 +1,5 @@ +package com.baeldung.d; + +public class StandardKeyboard implements Keyboard { + +} diff --git a/patterns/principles/solid/src/main/java/com/baeldung/d/Windows98Machine.java b/patterns/solid/src/main/java/com/baeldung/d/Windows98Machine.java similarity index 66% rename from patterns/principles/solid/src/main/java/com/baeldung/d/Windows98Machine.java rename to patterns/solid/src/main/java/com/baeldung/d/Windows98Machine.java index a9f130aedb..4d6ead9aa2 100644 --- a/patterns/principles/solid/src/main/java/com/baeldung/d/Windows98Machine.java +++ b/patterns/solid/src/main/java/com/baeldung/d/Windows98Machine.java @@ -2,13 +2,13 @@ package com.baeldung.d; public class Windows98Machine { - private final Keyboard keyboard; + private final StandardKeyboard keyboard; private final Monitor monitor; public Windows98Machine() { monitor = new Monitor(); - keyboard = new Keyboard(); + keyboard = new StandardKeyboard(); } diff --git a/patterns/principles/solid/src/main/java/com/baeldung/d/Windows98MachineDI.java b/patterns/solid/src/main/java/com/baeldung/d/Windows98MachineDI.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/d/Windows98MachineDI.java rename to patterns/solid/src/main/java/com/baeldung/d/Windows98MachineDI.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/i/BearCarer.java b/patterns/solid/src/main/java/com/baeldung/i/BearCarer.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/i/BearCarer.java rename to patterns/solid/src/main/java/com/baeldung/i/BearCarer.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/i/BearCleaner.java b/patterns/solid/src/main/java/com/baeldung/i/BearCleaner.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/i/BearCleaner.java rename to patterns/solid/src/main/java/com/baeldung/i/BearCleaner.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/i/BearFeeder.java b/patterns/solid/src/main/java/com/baeldung/i/BearFeeder.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/i/BearFeeder.java rename to patterns/solid/src/main/java/com/baeldung/i/BearFeeder.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/i/BearKeeper.java b/patterns/solid/src/main/java/com/baeldung/i/BearKeeper.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/i/BearKeeper.java rename to patterns/solid/src/main/java/com/baeldung/i/BearKeeper.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/i/BearPetter.java b/patterns/solid/src/main/java/com/baeldung/i/BearPetter.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/i/BearPetter.java rename to patterns/solid/src/main/java/com/baeldung/i/BearPetter.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/i/CrazyPerson.java b/patterns/solid/src/main/java/com/baeldung/i/CrazyPerson.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/i/CrazyPerson.java rename to patterns/solid/src/main/java/com/baeldung/i/CrazyPerson.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/l/Car.java b/patterns/solid/src/main/java/com/baeldung/l/Car.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/l/Car.java rename to patterns/solid/src/main/java/com/baeldung/l/Car.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/l/ElectricCar.java b/patterns/solid/src/main/java/com/baeldung/l/ElectricCar.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/l/ElectricCar.java rename to patterns/solid/src/main/java/com/baeldung/l/ElectricCar.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/l/Engine.java b/patterns/solid/src/main/java/com/baeldung/l/Engine.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/l/Engine.java rename to patterns/solid/src/main/java/com/baeldung/l/Engine.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/l/MotorCar.java b/patterns/solid/src/main/java/com/baeldung/l/MotorCar.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/l/MotorCar.java rename to patterns/solid/src/main/java/com/baeldung/l/MotorCar.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/o/Guitar.java b/patterns/solid/src/main/java/com/baeldung/o/Guitar.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/o/Guitar.java rename to patterns/solid/src/main/java/com/baeldung/o/Guitar.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/o/SuperCoolGuitarWithFlames.java b/patterns/solid/src/main/java/com/baeldung/o/SuperCoolGuitarWithFlames.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/o/SuperCoolGuitarWithFlames.java rename to patterns/solid/src/main/java/com/baeldung/o/SuperCoolGuitarWithFlames.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/s/BadBook.java b/patterns/solid/src/main/java/com/baeldung/s/BadBook.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/s/BadBook.java rename to patterns/solid/src/main/java/com/baeldung/s/BadBook.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/s/BookPrinter.java b/patterns/solid/src/main/java/com/baeldung/s/BookPrinter.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/s/BookPrinter.java rename to patterns/solid/src/main/java/com/baeldung/s/BookPrinter.java diff --git a/patterns/principles/solid/src/main/java/com/baeldung/s/GoodBook.java b/patterns/solid/src/main/java/com/baeldung/s/GoodBook.java similarity index 100% rename from patterns/principles/solid/src/main/java/com/baeldung/s/GoodBook.java rename to patterns/solid/src/main/java/com/baeldung/s/GoodBook.java diff --git a/persistence-modules/activejdbc/pom.xml b/persistence-modules/activejdbc/pom.xml index 6a29f14ced..45a618b840 100644 --- a/persistence-modules/activejdbc/pom.xml +++ b/persistence-modules/activejdbc/pom.xml @@ -3,8 +3,8 @@ 4.0.0 activejdbc 1.0-SNAPSHOT - jar activejdbc + jar http://maven.apache.org diff --git a/persistence-modules/apache-cayenne/pom.xml b/persistence-modules/apache-cayenne/pom.xml index d0c6d1f2b2..776b2b5233 100644 --- a/persistence-modules/apache-cayenne/pom.xml +++ b/persistence-modules/apache-cayenne/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - apache-cayenne 0.0.1-SNAPSHOT - jar apache-cayenne + jar Introduction to Apache Cayenne diff --git a/persistence-modules/core-java-persistence/pom.xml b/persistence-modules/core-java-persistence/pom.xml index f012d60ee6..a777eeb73f 100644 --- a/persistence-modules/core-java-persistence/pom.xml +++ b/persistence-modules/core-java-persistence/pom.xml @@ -4,14 +4,16 @@ com.baeldung.core-java-persistence core-java-persistence 0.1.0-SNAPSHOT - jar core-java-persistence + jar + com.baeldung parent-java 0.0.1-SNAPSHOT ../../parent-java + org.assertj @@ -50,6 +52,7 @@ ${springframework.boot.spring-boot-starter.version} + core-java-persistence @@ -58,7 +61,8 @@ true - + + 3.10.0 1.4.197 @@ -68,4 +72,5 @@ 1.5.8.RELEASE 4.3.4.RELEASE + \ No newline at end of file diff --git a/persistence-modules/deltaspike/pom.xml b/persistence-modules/deltaspike/pom.xml index b798d2f39e..9a4669102a 100644 --- a/persistence-modules/deltaspike/pom.xml +++ b/persistence-modules/deltaspike/pom.xml @@ -5,8 +5,8 @@ com.baeldung deltaspike 1.0 - war deltaspike + war A starter Java EE 7 webapp which uses DeltaSpike http://wildfly.org diff --git a/persistence-modules/flyway/pom.xml b/persistence-modules/flyway/pom.xml index 237b426521..eb827f5675 100644 --- a/persistence-modules/flyway/pom.xml +++ b/persistence-modules/flyway/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 flyway - jar flyway + jar Flyway Callbacks Demo diff --git a/persistence-modules/influxdb/pom.xml b/persistence-modules/influxdb/pom.xml index 5043d61897..8e1aeebe6d 100644 --- a/persistence-modules/influxdb/pom.xml +++ b/persistence-modules/influxdb/pom.xml @@ -4,8 +4,8 @@ 4.0.0 influxdb 0.1-SNAPSHOT - jar influxdb + jar InfluxDB SDK Tutorial diff --git a/persistence-modules/java-jpa/README.md b/persistence-modules/java-jpa/README.md index 5fe119cca4..2c26581bab 100644 --- a/persistence-modules/java-jpa/README.md +++ b/persistence-modules/java-jpa/README.md @@ -5,3 +5,4 @@ - [Fixing the JPA error “java.lang.String cannot be cast to Ljava.lang.String;”](https://www.baeldung.com/jpa-error-java-lang-string-cannot-be-cast) - [JPA Entity Graph](https://www.baeldung.com/jpa-entity-graph) - [JPA 2.2 Support for Java 8 Date/Time Types](https://www.baeldung.com/jpa-java-time) +- [Converting Between LocalDate and SQL Date](https://www.baeldung.com/java-convert-localdate-sql-date) diff --git a/persistence-modules/jnosql/jnosql-artemis/pom.xml b/persistence-modules/jnosql/jnosql-artemis/pom.xml index 8a978fb179..a07f26c6ee 100644 --- a/persistence-modules/jnosql/jnosql-artemis/pom.xml +++ b/persistence-modules/jnosql/jnosql-artemis/pom.xml @@ -12,11 +12,30 @@ jnosql 1.0-SNAPSHOT - - - 2.4.2 - false - + + + + javax + javaee-web-api + 8.0 + provided + + + org.jnosql.artemis + artemis-configuration + ${jnosql.version} + + + org.jnosql.artemis + artemis-document + ${jnosql.version} + + + org.jnosql.diana + mongodb-driver + ${jnosql.version} + + ${project.artifactId} @@ -58,31 +77,9 @@ - - - - javax - javaee-web-api - 8.0 - provided - - - - org.jnosql.artemis - artemis-configuration - ${jnosql.version} - - - org.jnosql.artemis - artemis-document - ${jnosql.version} - - - org.jnosql.diana - mongodb-driver - ${jnosql.version} - - - + + 2.4.2 + false + diff --git a/persistence-modules/jnosql/jnosql-diana/pom.xml b/persistence-modules/jnosql/jnosql-diana/pom.xml index 126f0314d9..b52c808cf5 100644 --- a/persistence-modules/jnosql/jnosql-diana/pom.xml +++ b/persistence-modules/jnosql/jnosql-diana/pom.xml @@ -12,45 +12,6 @@ 1.0-SNAPSHOT - - - - org.codehaus.mojo - exec-maven-plugin - 1.6.0 - - - document - - java - - - com.baeldung.jnosql.diana.document.DocumentApp - - - - column - - java - - - com.baeldung.jnosql.diana.column.ColumnFamilyApp - - - - key - - java - - - com.baeldung.jnosql.diana.key.KeyValueApp - - - - - - - @@ -90,4 +51,43 @@ + + + + org.codehaus.mojo + exec-maven-plugin + 1.6.0 + + + document + + java + + + com.baeldung.jnosql.diana.document.DocumentApp + + + + column + + java + + + com.baeldung.jnosql.diana.column.ColumnFamilyApp + + + + key + + java + + + com.baeldung.jnosql.diana.key.KeyValueApp + + + + + + + \ No newline at end of file diff --git a/persistence-modules/jnosql/pom.xml b/persistence-modules/jnosql/pom.xml index 5fb29a3b9c..513a447b91 100644 --- a/persistence-modules/jnosql/pom.xml +++ b/persistence-modules/jnosql/pom.xml @@ -9,15 +9,14 @@ jnosql pom - - 1.8 - 1.8 - 0.0.5 - - jnosql-diana jnosql-artemis + + 1.8 + 1.8 + 0.0.5 + diff --git a/persistence-modules/querydsl/pom.xml b/persistence-modules/querydsl/pom.xml index d3bf1b1fb7..4d4347e909 100644 --- a/persistence-modules/querydsl/pom.xml +++ b/persistence-modules/querydsl/pom.xml @@ -5,8 +5,8 @@ com.baeldung querydsl 0.1-SNAPSHOT - jar querydsl + jar http://maven.apache.org diff --git a/persistence-modules/solr/pom.xml b/persistence-modules/solr/pom.xml index 49f2f85856..1c14c06315 100644 --- a/persistence-modules/solr/pom.xml +++ b/persistence-modules/solr/pom.xml @@ -4,8 +4,8 @@ com.baeldung solr 0.0.1-SNAPSHOT - jar solr + jar com.baeldung diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml b/persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml index 6ebc75de8d..a181360e2b 100644 --- a/persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml +++ b/persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml @@ -8,7 +8,6 @@ 0.0.1-SNAPSHOT spring-boot-h2-database jar - Demo Spring Boot applications that starts H2 in memory database @@ -18,20 +17,11 @@ - - UTF-8 - UTF-8 - 1.8 - - com.baeldung.h2db.demo.server.SpringBootApp - - org.springframework.boot spring-boot-starter-data-jpa - com.h2database h2 @@ -51,4 +41,13 @@ + + + UTF-8 + UTF-8 + 1.8 + + com.baeldung.h2db.demo.server.SpringBootApp + + diff --git a/persistence-modules/spring-boot-persistence-mongodb/pom.xml b/persistence-modules/spring-boot-persistence-mongodb/pom.xml index fc267eedf6..86b93c7826 100644 --- a/persistence-modules/spring-boot-persistence-mongodb/pom.xml +++ b/persistence-modules/spring-boot-persistence-mongodb/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-persistence-mongodb + spring-boot-persistence-mongodb + war + This is simple boot application for Spring boot persistence mongodb test parent-boot-2 @@ -11,11 +15,6 @@ ../../parent-boot-2 - spring-boot-persistence-mongodb - war - spring-boot-persistence-mongodb - This is simple boot application for Spring boot persistence mongodb test - org.springframework.boot diff --git a/persistence-modules/spring-boot-persistence/README.MD b/persistence-modules/spring-boot-persistence/README.MD index cab6be1ec8..6fe5e6f05f 100644 --- a/persistence-modules/spring-boot-persistence/README.MD +++ b/persistence-modules/spring-boot-persistence/README.MD @@ -6,4 +6,4 @@ - [Configuring a Tomcat Connection Pool in Spring Boot](https://www.baeldung.com/spring-boot-tomcat-connection-pool) - [Hibernate Field Naming with Spring Boot](https://www.baeldung.com/hibernate-field-naming-spring-boot) - [Integrating Spring Boot with HSQLDB](https://www.baeldung.com/spring-boot-hsqldb) - +- [Configuring a DataSource Programmatically in Spring Boot](https://www.baeldung.com/spring-boot-configure-data-source-programmatic) diff --git a/persistence-modules/spring-data-cassandra-reactive/pom.xml b/persistence-modules/spring-data-cassandra-reactive/pom.xml index 5303f9a53a..d2bc574ee9 100644 --- a/persistence-modules/spring-data-cassandra-reactive/pom.xml +++ b/persistence-modules/spring-data-cassandra-reactive/pom.xml @@ -3,13 +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 - com.baeldung spring-data-cassandra-reactive 0.0.1-SNAPSHOT - jar - spring-data-cassandra-reactive + jar Spring Data Cassandra reactive @@ -19,13 +17,6 @@ ../../parent-boot-2 - - UTF-8 - UTF-8 - - 1.8 - - org.springframework.data @@ -57,5 +48,11 @@ + + UTF-8 + UTF-8 + + 1.8 + diff --git a/persistence-modules/spring-data-cassandra/pom.xml b/persistence-modules/spring-data-cassandra/pom.xml index 11953a734b..4f323a72d8 100644 --- a/persistence-modules/spring-data-cassandra/pom.xml +++ b/persistence-modules/spring-data-cassandra/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-data-cassandra 0.0.1-SNAPSHOT - jar spring-data-cassandra + jar com.baeldung diff --git a/persistence-modules/spring-data-elasticsearch/pom.xml b/persistence-modules/spring-data-elasticsearch/pom.xml index ee9e71a1cb..9495d56798 100644 --- a/persistence-modules/spring-data-elasticsearch/pom.xml +++ b/persistence-modules/spring-data-elasticsearch/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-data-elasticsearch 0.0.1-SNAPSHOT - jar spring-data-elasticsearch + jar com.baeldung diff --git a/persistence-modules/spring-data-jpa/README.md b/persistence-modules/spring-data-jpa/README.md index 976a692699..739031ff5e 100644 --- a/persistence-modules/spring-data-jpa/README.md +++ b/persistence-modules/spring-data-jpa/README.md @@ -19,6 +19,7 @@ - [Sorting Query Results with Spring Data](https://www.baeldung.com/spring-data-sorting) - [INSERT Statement in JPA](https://www.baeldung.com/jpa-insert) - [Pagination and Sorting using Spring Data JPA](https://www.baeldung.com/spring-data-jpa-pagination-sorting) +- [Spring Data JPA Query by Example](https://www.baeldung.com/spring-data-query-by-example) ### Eclipse Config After importing the project into Eclipse, you may see the following error: diff --git a/persistence-modules/spring-data-mongodb/pom.xml b/persistence-modules/spring-data-mongodb/pom.xml index c1faf72103..7156cdf071 100644 --- a/persistence-modules/spring-data-mongodb/pom.xml +++ b/persistence-modules/spring-data-mongodb/pom.xml @@ -23,7 +23,6 @@ spring-data-releasetrain Lovelace-SR3 pom - import diff --git a/persistence-modules/spring-data-solr/pom.xml b/persistence-modules/spring-data-solr/pom.xml index dcba80b49a..82539b0ca8 100644 --- a/persistence-modules/spring-data-solr/pom.xml +++ b/persistence-modules/spring-data-solr/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-data-solr 0.0.1-SNAPSHOT - jar spring-data-solr + jar com.baeldung diff --git a/persistence-modules/spring-jpa/pom.xml b/persistence-modules/spring-jpa/pom.xml index 400811b582..29a6996791 100644 --- a/persistence-modules/spring-jpa/pom.xml +++ b/persistence-modules/spring-jpa/pom.xml @@ -3,8 +3,8 @@ 4.0.0 spring-jpa 0.1-SNAPSHOT - war spring-jpa + war com.baeldung diff --git a/ratpack/pom.xml b/ratpack/pom.xml index 7de11e6955..a4389275b6 100644 --- a/ratpack/pom.xml +++ b/ratpack/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung ratpack - jar 1.0-SNAPSHOT ratpack + jar http://maven.apache.org diff --git a/resteasy/bin/pom.xml b/resteasy/bin/pom.xml index f8cdc20360..15d8b5bd18 100644 --- a/resteasy/bin/pom.xml +++ b/resteasy/bin/pom.xml @@ -2,18 +2,11 @@ 4.0.0 - com.baeldung resteasy-tutorial 1.0 war - - 3.0.19.Final - 2.5 - 1.6.1 - - com.baeldung resteasy-tutorial @@ -80,4 +73,10 @@ ${commons-io.version} + + + 3.0.19.Final + 2.5 + 1.6.1 + \ No newline at end of file diff --git a/resteasy/pom.xml b/resteasy/pom.xml index 31a6ed485a..ca4124abca 100644 --- a/resteasy/pom.xml +++ b/resteasy/pom.xml @@ -5,8 +5,8 @@ com.baeldung resteasy 1.0 - war resteasy + war com.baeldung diff --git a/restx/pom.xml b/restx/pom.xml index c6233b968c..cc503f89b6 100644 --- a/restx/pom.xml +++ b/restx/pom.xml @@ -3,17 +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 - restx 0.1-SNAPSHOT - war restx-demo - - - 1.8 - 1.8 - 0.35-rc4 - + war com.baeldung @@ -106,7 +99,7 @@ ch.qos.logback logback-classic - 1.0.13 + ${logback-classic.version} io.restx @@ -117,10 +110,11 @@ junit junit - 4.11 + ${junit.version} test + @@ -152,4 +146,11 @@ + + + 1.8 + 1.8 + 0.35-rc4 + 1.0.13 + diff --git a/rsocket/pom.xml b/rsocket/pom.xml index 8b04a31583..d2182719c2 100644 --- a/rsocket/pom.xml +++ b/rsocket/pom.xml @@ -4,51 +4,61 @@ rsocket 0.0.1-SNAPSHOT rsocket + jar - + com.baeldung parent-modules 1.0.0-SNAPSHOT - jar - + io.rsocket rsocket-core - 0.11.13 + ${rsocket.version} io.rsocket rsocket-transport-netty - 0.11.13 + ${rsocket.version} junit junit - 4.12 + ${junit.version} test org.hamcrest hamcrest-core - 1.3 + ${hamcrest.version} test ch.qos.logback logback-classic - 1.2.3 + ${logback.version} ch.qos.logback logback-core - 1.2.3 + ${logback.version} org.slf4j slf4j-api - 1.7.25 + ${slf4j-api.version} - \ No newline at end of file + + + 1.8 + 1.8 + 3.0.1 + 0.11.13 + 1.3 + 1.2.3 + 1.7.25 + + diff --git a/rxjava-2/pom.xml b/rxjava-2/pom.xml index 3038c20037..2519516f45 100644 --- a/rxjava-2/pom.xml +++ b/rxjava-2/pom.xml @@ -3,7 +3,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 - rxjava-2 1.0-SNAPSHOT diff --git a/saas/pom.xml b/saas/pom.xml index 2abc932497..35de34ea72 100644 --- a/saas/pom.xml +++ b/saas/pom.xml @@ -4,8 +4,8 @@ com.baeldung saas 0.1.0-SNAPSHOT - jar saas + jar com.baeldung diff --git a/software-security/sql-injection-samples/pom.xml b/software-security/sql-injection-samples/pom.xml index d5e64db6b3..e1590662b7 100644 --- a/software-security/sql-injection-samples/pom.xml +++ b/software-security/sql-injection-samples/pom.xml @@ -2,23 +2,18 @@ 4.0.0 - - - parent-boot-2 - com.baeldung - 0.0.1-SNAPSHOT - ../../parent-boot-2 - - com.baeldung sql-injection-samples 0.0.1-SNAPSHOT sql-injection-samples Sample SQL Injection tests - - 1.8 - + + parent-boot-2 + com.baeldung + 0.0.1-SNAPSHOT + ../../parent-boot-2 + @@ -58,4 +53,8 @@ + + 1.8 + + diff --git a/spring-4/pom.xml b/spring-4/pom.xml index 60f1555d8f..eb64c1839f 100644 --- a/spring-4/pom.xml +++ b/spring-4/pom.xml @@ -3,8 +3,8 @@ 4.0.0 spring-4 spring-4 - jar spring-4 + jar parent-boot-1 diff --git a/spring-5-mvc/pom.xml b/spring-5-mvc/pom.xml index f5346a0fa0..5fb8f66f71 100644 --- a/spring-5-mvc/pom.xml +++ b/spring-5-mvc/pom.xml @@ -5,9 +5,9 @@ com.baeldung spring-5-mvc 0.0.1-SNAPSHOT - jar spring-5-mvc spring 5 MVC sample project about new features + jar com.baeldung diff --git a/spring-5-reactive-client/pom.xml b/spring-5-reactive-client/pom.xml index 6e39743ed0..1b71815eb4 100644 --- a/spring-5-reactive-client/pom.xml +++ b/spring-5-reactive-client/pom.xml @@ -2,10 +2,9 @@ 4.0.0 - spring-5-reactive-client - jar spring-5-reactive-client + jar spring 5 sample project about new features diff --git a/spring-5-reactive-oauth/README.md b/spring-5-reactive-oauth/README.md index 0f27cf5d20..ec5176670b 100644 --- a/spring-5-reactive-oauth/README.md +++ b/spring-5-reactive-oauth/README.md @@ -1,3 +1,4 @@ ### Relevant Articles: - [Spring Security OAuth Login with WebFlux](https://www.baeldung.com/spring-oauth-login-webflux) +- [Spring WebClient and OAuth2 Support](https://www.baeldung.com/spring-webclient-oauth2) diff --git a/spring-5-reactive-oauth/pom.xml b/spring-5-reactive-oauth/pom.xml index 4e05227c6c..86a5233ad4 100644 --- a/spring-5-reactive-oauth/pom.xml +++ b/spring-5-reactive-oauth/pom.xml @@ -2,13 +2,11 @@ 4.0.0 - com.baeldung.reactive.oauth spring-5-reactive-oauth 1.0.0-SNAPSHOT - jar - spring-5-reactive-oauth + jar WebFluc and Spring Security OAuth @@ -18,12 +16,6 @@ - - UTF-8 - UTF-8 - 1.8 - - org.springframework.boot @@ -74,4 +66,10 @@ + + UTF-8 + UTF-8 + 1.8 + + diff --git a/spring-5-reactive-security/pom.xml b/spring-5-reactive-security/pom.xml index 3b64b9b3ac..72a73a86ce 100644 --- a/spring-5-reactive-security/pom.xml +++ b/spring-5-reactive-security/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - com.baeldung spring-5-reactive-security 0.0.1-SNAPSHOT - jar spring-5-reactive-security + jar spring 5 security sample project about new features diff --git a/spring-5-reactive/pom.xml b/spring-5-reactive/pom.xml index 63cc185afe..a1eb6f4c8a 100644 --- a/spring-5-reactive/pom.xml +++ b/spring-5-reactive/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - com.baeldung spring-5-reactive 0.0.1-SNAPSHOT - jar spring-5-reactive + jar spring 5 sample project about new features diff --git a/spring-5-security-oauth/pom.xml b/spring-5-security-oauth/pom.xml index 59150a153f..d9a1e3094e 100644 --- a/spring-5-security-oauth/pom.xml +++ b/spring-5-security-oauth/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-5-security-oauth 0.0.1-SNAPSHOT - jar spring-5-security-oauth + jar spring 5 security oauth sample project diff --git a/spring-5-security/pom.xml b/spring-5-security/pom.xml index c26e370381..413337633f 100644 --- a/spring-5-security/pom.xml +++ b/spring-5-security/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-5-security 0.0.1-SNAPSHOT - jar spring-5-security + jar spring 5 security sample project @@ -16,7 +16,6 @@ - org.springframework.boot spring-boot-starter-security diff --git a/spring-5/pom.xml b/spring-5/pom.xml index 58c14475e0..701aa3831d 100644 --- a/spring-5/pom.xml +++ b/spring-5/pom.xml @@ -6,8 +6,8 @@ com.baeldung spring-5 0.0.1-SNAPSHOT - jar spring-5 + jar spring 5 sample project about new features @@ -89,6 +89,12 @@ org.junit.jupiter junit-jupiter-api + + org.awaitility + awaitility + ${awaitility.version} + test + org.springframework.restdocs @@ -156,7 +162,7 @@ 4.1 ${project.build.directory}/generated-snippets 2.21.0 - + 3.1.6 diff --git a/spring-5/src/main/java/com/baeldung/config/ScheduledConfig.java b/spring-5/src/main/java/com/baeldung/config/ScheduledConfig.java new file mode 100644 index 0000000000..b54a2b5339 --- /dev/null +++ b/spring-5/src/main/java/com/baeldung/config/ScheduledConfig.java @@ -0,0 +1,11 @@ +package com.baeldung.config; + +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.Configuration; +import org.springframework.scheduling.annotation.EnableScheduling; + +@Configuration +@EnableScheduling +@ComponentScan("com.baeldung.scheduled") +public class ScheduledConfig { +} diff --git a/spring-5/src/main/java/com/baeldung/scheduled/Counter.java b/spring-5/src/main/java/com/baeldung/scheduled/Counter.java new file mode 100644 index 0000000000..17aa15b6f3 --- /dev/null +++ b/spring-5/src/main/java/com/baeldung/scheduled/Counter.java @@ -0,0 +1,20 @@ +package com.baeldung.scheduled; + +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Component; + +import java.util.concurrent.atomic.AtomicInteger; + +@Component +public class Counter { + private final AtomicInteger count = new AtomicInteger(0); + + @Scheduled(fixedDelay = 5) + public void scheduled() { + this.count.incrementAndGet(); + } + + public int getInvocationCount() { + return this.count.get(); + } +} diff --git a/spring-5/src/test/java/com/baeldung/scheduled/ScheduledAwaitilityIntegrationTest.java b/spring-5/src/test/java/com/baeldung/scheduled/ScheduledAwaitilityIntegrationTest.java new file mode 100644 index 0000000000..4883aa16c2 --- /dev/null +++ b/spring-5/src/test/java/com/baeldung/scheduled/ScheduledAwaitilityIntegrationTest.java @@ -0,0 +1,24 @@ +package com.baeldung.scheduled; + +import com.baeldung.config.ScheduledConfig; +import org.awaitility.Duration; +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.mock.mockito.SpyBean; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; + +import static org.awaitility.Awaitility.await; +import static org.mockito.Mockito.atLeast; +import static org.mockito.Mockito.verify; + +@SpringJUnitConfig(ScheduledConfig.class) +public class ScheduledAwaitilityIntegrationTest { + + @SpyBean private Counter counter; + + @Test + public void whenWaitOneSecond_thenScheduledIsCalledAtLeastTenTimes() { + await() + .atMost(Duration.ONE_SECOND) + .untilAsserted(() -> verify(counter, atLeast(10)).scheduled()); + } +} diff --git a/spring-5/src/test/java/com/baeldung/scheduled/ScheduledIntegrationTest.java b/spring-5/src/test/java/com/baeldung/scheduled/ScheduledIntegrationTest.java new file mode 100644 index 0000000000..058cd50caa --- /dev/null +++ b/spring-5/src/test/java/com/baeldung/scheduled/ScheduledIntegrationTest.java @@ -0,0 +1,22 @@ +package com.baeldung.scheduled; + +import com.baeldung.config.ScheduledConfig; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; + +import static org.assertj.core.api.Assertions.assertThat; + +@SpringJUnitConfig(ScheduledConfig.class) +public class ScheduledIntegrationTest { + + @Autowired Counter counter; + + @Test + public void givenSleepBy100ms_whenGetInvocationCount_thenIsGreaterThanZero() throws InterruptedException { + Thread.sleep(100L); + + assertThat(counter.getInvocationCount()).isGreaterThan(0); + } + +} diff --git a/spring-activiti/pom.xml b/spring-activiti/pom.xml index 4e21c5b032..3d67a2ab7b 100644 --- a/spring-activiti/pom.xml +++ b/spring-activiti/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-activiti - jar spring-activiti + jar Demo project for Spring Boot diff --git a/spring-all/pom.xml b/spring-all/pom.xml index 77c7e74e08..5872fbdac5 100644 --- a/spring-all/pom.xml +++ b/spring-all/pom.xml @@ -160,12 +160,12 @@ net.javacrumbs.shedlock shedlock-spring - 2.1.0 + ${shedlock.version} net.javacrumbs.shedlock shedlock-provider-jdbc-template - 2.1.0 + ${shedlock.version} @@ -243,7 +243,7 @@ 3.6 3.6.1 6.6.0 - + 2.1.0 3.22.0-GA diff --git a/spring-amqp/pom.xml b/spring-amqp/pom.xml index e08a4243b3..c021bd49ff 100755 --- a/spring-amqp/pom.xml +++ b/spring-amqp/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-amqp 0.1-SNAPSHOT - jar spring-amqp + jar Introduction to Spring-AMQP diff --git a/spring-aop/pom.xml b/spring-aop/pom.xml index 9e2f97916a..a1e2ffd534 100644 --- a/spring-aop/pom.xml +++ b/spring-aop/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-aop - war spring-aop + war parent-boot-2 diff --git a/spring-apache-camel/pom.xml b/spring-apache-camel/pom.xml index 662b3f899c..3e76c0c7f1 100644 --- a/spring-apache-camel/pom.xml +++ b/spring-apache-camel/pom.xml @@ -3,9 +3,9 @@ 4.0.0 org.apache.camel spring-apache-camel - jar 1.0-SNAPSHOT spring-apache-camel + jar http://maven.apache.org diff --git a/spring-batch/pom.xml b/spring-batch/pom.xml index cfd725b2bd..e81078568b 100644 --- a/spring-batch/pom.xml +++ b/spring-batch/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-batch 0.1-SNAPSHOT - jar spring-batch + jar http://maven.apache.org diff --git a/spring-boot-admin/spring-boot-admin-client/pom.xml b/spring-boot-admin/spring-boot-admin-client/pom.xml index ea03d6ef6d..7563a01172 100644 --- a/spring-boot-admin/spring-boot-admin-client/pom.xml +++ b/spring-boot-admin/spring-boot-admin-client/pom.xml @@ -4,9 +4,9 @@ 4.0.0 spring-boot-admin-client 0.0.1-SNAPSHOT - jar spring-boot-admin-client Spring Boot Admin Client + jar spring-boot-admin diff --git a/spring-boot-admin/spring-boot-admin-server/pom.xml b/spring-boot-admin/spring-boot-admin-server/pom.xml index d8e7bb5574..d429d9289f 100644 --- a/spring-boot-admin/spring-boot-admin-server/pom.xml +++ b/spring-boot-admin/spring-boot-admin-server/pom.xml @@ -4,9 +4,9 @@ 4.0.0 spring-boot-admin-server 0.0.1-SNAPSHOT - jar spring-boot-admin-server Spring Boot Admin Server + jar spring-boot-admin diff --git a/spring-boot-angular-ecommerce/pom.xml b/spring-boot-angular-ecommerce/pom.xml index dc92a91d02..a5296eade8 100644 --- a/spring-boot-angular-ecommerce/pom.xml +++ b/spring-boot-angular-ecommerce/pom.xml @@ -2,12 +2,10 @@ 4.0.0 - spring-boot-angular-ecommerce 0.0.1-SNAPSHOT - jar - spring-boot-angular-ecommerce + jar Spring Boot Angular E-commerce Appliciation diff --git a/spring-boot-autoconfiguration/pom.xml b/spring-boot-autoconfiguration/pom.xml index 1c3d8796ed..91692ebfff 100644 --- a/spring-boot-autoconfiguration/pom.xml +++ b/spring-boot-autoconfiguration/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-boot-autoconfiguration 0.0.1-SNAPSHOT - war spring-boot-autoconfiguration + war This is simple boot application demonstrating a custom auto-configuration diff --git a/spring-boot-bootstrap/README.md b/spring-boot-bootstrap/README.md index 76b977c129..2186aa8fec 100644 --- a/spring-boot-bootstrap/README.md +++ b/spring-boot-bootstrap/README.md @@ -5,3 +5,4 @@ - [Deploying a Spring Boot Application to Cloud Foundry](https://www.baeldung.com/spring-boot-app-deploy-to-cloud-foundry) - [Deploy a Spring Boot Application to Google App Engine](https://www.baeldung.com/spring-boot-google-app-engine) - [Deploy a Spring Boot Application to OpenShift](https://www.baeldung.com/spring-boot-deploy-openshift) +- [Deploy a Spring Boot Application to AWS Beanstalk](https://www.baeldung.com/spring-boot-deploy-aws-beanstalk) diff --git a/spring-boot-bootstrap/pom.xml b/spring-boot-bootstrap/pom.xml index 0ffc1820b8..f13801f532 100644 --- a/spring-boot-bootstrap/pom.xml +++ b/spring-boot-bootstrap/pom.xml @@ -4,16 +4,18 @@ 4.0.0 com.baeldung spring-boot-bootstrap - jar spring-boot-bootstrap Demo project for Spring Boot - + jar + + parent-boot-2 com.baeldung 0.0.1-SNAPSHOT ../parent-boot-2 - + + org.springframework.boot spring-boot-starter-web @@ -312,7 +314,8 @@ - + + org.apache.maven.plugins @@ -325,7 +328,8 @@ - + + 4.0.0 diff --git a/spring-boot-client/pom.xml b/spring-boot-client/pom.xml index fc89931f79..4850849039 100644 --- a/spring-boot-client/pom.xml +++ b/spring-boot-client/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-boot-client 0.0.1-SNAPSHOT - war spring-boot-client + war This is simple boot client application for Spring boot actuator test diff --git a/spring-boot-jasypt/pom.xml b/spring-boot-jasypt/pom.xml index de0df92678..ae0483f107 100644 --- a/spring-boot-jasypt/pom.xml +++ b/spring-boot-jasypt/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - com.example.jasypt spring-boot-jasypt - jar spring-boot-jasypt + jar Demo project for Spring Boot diff --git a/spring-boot-keycloak/pom.xml b/spring-boot-keycloak/pom.xml index 3a39d4aa94..b13805b4bf 100644 --- a/spring-boot-keycloak/pom.xml +++ b/spring-boot-keycloak/pom.xml @@ -5,9 +5,9 @@ com.baeldung.keycloak spring-boot-keycloak 0.0.1 - jar spring-boot-keycloak This is a simple application demonstrating integration between Keycloak and Spring Boot. + jar com.baeldung diff --git a/spring-boot-libraries/pom.xml b/spring-boot-libraries/pom.xml index 66aa66bdfd..b448d6fd66 100644 --- a/spring-boot-libraries/pom.xml +++ b/spring-boot-libraries/pom.xml @@ -3,8 +3,8 @@ 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 - war spring-boot-libraries + war This is simple boot application for Spring boot actuator test @@ -44,12 +44,12 @@ net.javacrumbs.shedlock shedlock-spring - 2.1.0 + ${shedlock.version} net.javacrumbs.shedlock shedlock-provider-jdbc-template - 2.1.0 + ${shedlock.version} @@ -151,6 +151,7 @@ 2.2.4 2.3.2 0.23.0 + 2.1.0 diff --git a/spring-boot-logging-log4j2/pom.xml b/spring-boot-logging-log4j2/pom.xml index ad678a14cf..6cc60da52c 100644 --- a/spring-boot-logging-log4j2/pom.xml +++ b/spring-boot-logging-log4j2/pom.xml @@ -3,8 +3,8 @@ 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-logging-log4j2 - jar spring-boot-logging-log4j2 + jar Demo project for Spring Boot Logging with Log4J2 @@ -40,12 +40,12 @@ org.springframework.boot spring-boot-starter-log4j - 1.3.8.RELEASE + ${spring-boot-starter-log4j.version} org.graylog2 gelfj - 1.1.16 + ${gelfj.version} compile @@ -71,5 +71,7 @@ com.baeldung.springbootlogging.SpringBootLoggingApplication + 1.3.8.RELEASE + 1.1.16 diff --git a/spring-boot-mvc/README.md b/spring-boot-mvc/README.md index bf32e4fc7c..0e1ac5a8ce 100644 --- a/spring-boot-mvc/README.md +++ b/spring-boot-mvc/README.md @@ -9,4 +9,5 @@ - [Display RSS Feed with Spring MVC](http://www.baeldung.com/spring-mvc-rss-feed) - [A Controller, Service and DAO Example with Spring Boot and JSF](https://www.baeldung.com/jsf-spring-boot-controller-service-dao) - [Cache Eviction in Spring Boot](https://www.baeldung.com/spring-boot-evict-cache) -- [Setting Up Swagger 2 with a Spring REST API](http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api) \ No newline at end of file +- [Setting Up Swagger 2 with a Spring REST API](http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api) +- [Conditionally Enable Scheduled Jobs in Spring](https://www.baeldung.com/spring-scheduled-enabled-conditionally) diff --git a/spring-boot-mvc/pom.xml b/spring-boot-mvc/pom.xml index bb3e6312ab..89fa6bb04d 100644 --- a/spring-boot-mvc/pom.xml +++ b/spring-boot-mvc/pom.xml @@ -3,8 +3,8 @@ 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 + jar Module For Spring Boot MVC diff --git a/spring-boot-ops/pom.xml b/spring-boot-ops/pom.xml index 9717a352d3..625b2ad188 100644 --- a/spring-boot-ops/pom.xml +++ b/spring-boot-ops/pom.xml @@ -2,10 +2,9 @@ 4.0.0 - spring-boot-ops - war spring-boot-ops + war Demo project for Spring Boot diff --git a/spring-boot-security/pom.xml b/spring-boot-security/pom.xml index b87189757a..aaa0fbf4c7 100644 --- a/spring-boot-security/pom.xml +++ b/spring-boot-security/pom.xml @@ -3,9 +3,9 @@ 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-security - jar spring-boot-security Spring Boot Security Auto-Configuration + jar parent-boot-1 diff --git a/spring-boot-testing/pom.xml b/spring-boot-testing/pom.xml index c2c886a4fe..caf48276b6 100644 --- a/spring-boot-testing/pom.xml +++ b/spring-boot-testing/pom.xml @@ -3,9 +3,9 @@ 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. + war parent-boot-2 diff --git a/spring-boot-vue/pom.xml b/spring-boot-vue/pom.xml index d581b11d68..4e47a98d6f 100644 --- a/spring-boot-vue/pom.xml +++ b/spring-boot-vue/pom.xml @@ -2,13 +2,11 @@ 4.0.0 - com.baeldung spring-boot-vue 0.0.1-SNAPSHOT - jar - spring-boot-vue + jar Demo project for Spring Boot Vue project @@ -18,12 +16,6 @@ ../parent-boot-2 - - UTF-8 - UTF-8 - 1.8 - - org.springframework.boot @@ -52,5 +44,10 @@ + + UTF-8 + UTF-8 + 1.8 + diff --git a/spring-boot/README.MD b/spring-boot/README.MD index 2a6a935cc1..28123687fd 100644 --- a/spring-boot/README.MD +++ b/spring-boot/README.MD @@ -35,3 +35,4 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring - [Load Spring Boot Properties From a JSON File](https://www.baeldung.com/spring-boot-json-properties) - [Display Auto-Configuration Report in Spring Boot](https://www.baeldung.com/spring-boot-auto-configuration-report) - [Injecting Git Information Into Spring](https://www.baeldung.com/spring-git-information) +- [Validation in Spring Boot](https://www.baeldung.com/spring-boot-bean-validation) diff --git a/spring-boot/pom.xml b/spring-boot/pom.xml index e6866b5a8f..2e463e0189 100644 --- a/spring-boot/pom.xml +++ b/spring-boot/pom.xml @@ -3,8 +3,8 @@ 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 - war spring-boot + war This is simple boot application for Spring boot actuator test diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java new file mode 100644 index 0000000000..f131d17196 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/Contact.java @@ -0,0 +1,70 @@ +package com.baeldung.jsondateformat; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +public class Contact { + + private String name; + private String address; + private String phone; + + @JsonFormat(pattern="yyyy-MM-dd") + private LocalDate birthday; + + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + private LocalDateTime lastUpdate; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public LocalDateTime getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(LocalDateTime lastUpdate) { + this.lastUpdate = lastUpdate; + } + + public Contact() { + } + + public Contact(String name, String address, String phone, LocalDate birthday, LocalDateTime lastUpdate) { + this.name = name; + this.address = address; + this.phone = phone; + this.birthday = birthday; + this.lastUpdate = lastUpdate; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java new file mode 100644 index 0000000000..79037e1038 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactApp.java @@ -0,0 +1,13 @@ +package com.baeldung.jsondateformat; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class ContactApp { + + public static void main(String[] args) { + SpringApplication.run(ContactApp.class, args); + } + +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java new file mode 100644 index 0000000000..7a20ebfa51 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactAppConfig.java @@ -0,0 +1,33 @@ +package com.baeldung.jsondateformat; + +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateSerializer; +import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; +import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import org.springframework.boot.autoconfigure.jackson.Jackson2ObjectMapperBuilderCustomizer; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; + +import java.time.format.DateTimeFormatter; + +@Configuration +public class ContactAppConfig { + + private static final String dateFormat = "yyyy-MM-dd"; + + private static final String dateTimeFormat = "yyyy-MM-dd HH:mm:ss"; + + @Bean + @ConditionalOnProperty(value = "spring.jackson.date-format", matchIfMissing = true, havingValue = "none") + public Jackson2ObjectMapperBuilderCustomizer jsonCustomizer() { + return new Jackson2ObjectMapperBuilderCustomizer() { + @Override + public void customize(Jackson2ObjectMapperBuilder builder) { + builder.simpleDateFormat(dateTimeFormat); + builder.serializers(new LocalDateSerializer(DateTimeFormatter.ofPattern(dateFormat))); + builder.serializers(new LocalDateTimeSerializer(DateTimeFormatter.ofPattern(dateTimeFormat))); + } + }; + } + +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java new file mode 100644 index 0000000000..8894d82fc7 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactController.java @@ -0,0 +1,77 @@ +package com.baeldung.jsondateformat; + +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +@RestController +@RequestMapping(value = "/contacts") +public class ContactController { + + @GetMapping + public List getContacts() { + List contacts = new ArrayList<>(); + + Contact contact1 = new Contact("John Doe", "123 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); + Contact contact2 = new Contact("John Doe 2", "124 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); + Contact contact3 = new Contact("John Doe 3", "125 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); + + contacts.add(contact1); + contacts.add(contact2); + contacts.add(contact3); + + return contacts; + } + + @GetMapping("/javaUtilDate") + public List getContactsWithJavaUtilDate() { + List contacts = new ArrayList<>(); + + ContactWithJavaUtilDate contact1 = new ContactWithJavaUtilDate("John Doe", "123 Sesame Street", "123-456-789", new Date(), new Date()); + ContactWithJavaUtilDate contact2 = new ContactWithJavaUtilDate("John Doe 2", "124 Sesame Street", "123-456-789", new Date(), new Date()); + ContactWithJavaUtilDate contact3 = new ContactWithJavaUtilDate("John Doe 3", "125 Sesame Street", "123-456-789", new Date(), new Date()); + + contacts.add(contact1); + contacts.add(contact2); + contacts.add(contact3); + + return contacts; + } + + @GetMapping("/plain") + public List getPlainContacts() { + List contacts = new ArrayList<>(); + + PlainContact contact1 = new PlainContact("John Doe", "123 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); + PlainContact contact2 = new PlainContact("John Doe 2", "124 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); + PlainContact contact3 = new PlainContact("John Doe 3", "125 Sesame Street", "123-456-789", LocalDate.now(), LocalDateTime.now()); + + contacts.add(contact1); + contacts.add(contact2); + contacts.add(contact3); + + return contacts; + } + + @GetMapping("/plainWithJavaUtilDate") + public List getPlainContactsWithJavaUtilDate() { + List contacts = new ArrayList<>(); + + PlainContactWithJavaUtilDate contact1 = new PlainContactWithJavaUtilDate("John Doe", "123 Sesame Street", "123-456-789", new Date(), new Date()); + PlainContactWithJavaUtilDate contact2 = new PlainContactWithJavaUtilDate("John Doe 2", "124 Sesame Street", "123-456-789", new Date(), new Date()); + PlainContactWithJavaUtilDate contact3 = new PlainContactWithJavaUtilDate("John Doe 3", "125 Sesame Street", "123-456-789", new Date(), new Date()); + + contacts.add(contact1); + contacts.add(contact2); + contacts.add(contact3); + + return contacts; + } + +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java new file mode 100644 index 0000000000..5a1c508098 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/ContactWithJavaUtilDate.java @@ -0,0 +1,69 @@ +package com.baeldung.jsondateformat; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.util.Date; + +public class ContactWithJavaUtilDate { + + private String name; + private String address; + private String phone; + + @JsonFormat(pattern="yyyy-MM-dd") + private Date birthday; + + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date lastUpdate; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Date getBirthday() { + return birthday; + } + + public void setBirthday(Date birthday) { + this.birthday = birthday; + } + + public Date getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(Date lastUpdate) { + this.lastUpdate = lastUpdate; + } + + public ContactWithJavaUtilDate() { + } + + public ContactWithJavaUtilDate(String name, String address, String phone, Date birthday, Date lastUpdate) { + this.name = name; + this.address = address; + this.phone = phone; + this.birthday = birthday; + this.lastUpdate = lastUpdate; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java new file mode 100644 index 0000000000..7e9e53d205 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContact.java @@ -0,0 +1,66 @@ +package com.baeldung.jsondateformat; + +import java.time.LocalDate; +import java.time.LocalDateTime; + +public class PlainContact { + + private String name; + private String address; + private String phone; + + private LocalDate birthday; + + private LocalDateTime lastUpdate; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public LocalDate getBirthday() { + return birthday; + } + + public void setBirthday(LocalDate birthday) { + this.birthday = birthday; + } + + public LocalDateTime getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(LocalDateTime lastUpdate) { + this.lastUpdate = lastUpdate; + } + + public PlainContact() { + } + + public PlainContact(String name, String address, String phone, LocalDate birthday, LocalDateTime lastUpdate) { + this.name = name; + this.address = address; + this.phone = phone; + this.birthday = birthday; + this.lastUpdate = lastUpdate; + } +} diff --git a/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java b/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java new file mode 100644 index 0000000000..daefb15543 --- /dev/null +++ b/spring-boot/src/main/java/com/baeldung/jsondateformat/PlainContactWithJavaUtilDate.java @@ -0,0 +1,69 @@ +package com.baeldung.jsondateformat; + +import com.fasterxml.jackson.annotation.JsonFormat; + +import java.util.Date; + +public class PlainContactWithJavaUtilDate { + + private String name; + private String address; + private String phone; + + @JsonFormat(pattern="yyyy-MM-dd") + private Date birthday; + + @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") + private Date lastUpdate; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public Date getBirthday() { + return birthday; + } + + public void setBirthday(Date birthday) { + this.birthday = birthday; + } + + public Date getLastUpdate() { + return lastUpdate; + } + + public void setLastUpdate(Date lastUpdate) { + this.lastUpdate = lastUpdate; + } + + public PlainContactWithJavaUtilDate() { + } + + public PlainContactWithJavaUtilDate(String name, String address, String phone, Date birthday, Date lastUpdate) { + this.name = name; + this.address = address; + this.phone = phone; + this.birthday = birthday; + this.lastUpdate = lastUpdate; + } +} diff --git a/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java b/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java index c1dd109f91..645ce2838a 100644 --- a/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java +++ b/spring-boot/src/main/java/org/baeldung/demo/boottest/Employee.java @@ -6,6 +6,7 @@ import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import javax.validation.constraints.Size; +import java.util.Date; @Entity @Table(name = "person") @@ -25,6 +26,8 @@ public class Employee { @Size(min = 3, max = 20) private String name; + private Date birthday; + public Long getId() { return id; } diff --git a/spring-boot/src/main/resources/application.properties b/spring-boot/src/main/resources/application.properties index 6a52dd1f70..00c251d823 100644 --- a/spring-boot/src/main/resources/application.properties +++ b/spring-boot/src/main/resources/application.properties @@ -73,3 +73,5 @@ chaos.monkey.watcher.repository=false #Component watcher active chaos.monkey.watcher.component=false +spring.jackson.date-format=yyyy-MM-dd HH:mm:ss +spring.jackson.time-zone=Europe/Zagreb diff --git a/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java b/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java new file mode 100644 index 0000000000..86af985d8a --- /dev/null +++ b/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppIntegrationTest.java @@ -0,0 +1,96 @@ +package com.baeldung.jsondateformat; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +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.boot.test.web.client.TestRestTemplate; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit4.SpringRunner; + +import java.io.IOException; +import java.text.ParseException; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.time.format.DateTimeParseException; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.DEFINED_PORT; + +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment = DEFINED_PORT, classes = ContactApp.class) +@TestPropertySource(properties = { + "spring.jackson.date-format=yyyy-MM-dd HH:mm:ss" +}) +public class ContactAppIntegrationTest { + + private final ObjectMapper mapper = new ObjectMapper(); + + @Autowired + TestRestTemplate restTemplate; + + @Test + public void givenJsonFormatAnnotationAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException, ParseException { + ResponseEntity response = restTemplate.getForEntity("http://localhost:8080/contacts", String.class); + + assertEquals(200, response.getStatusCodeValue()); + + List> respMap = mapper.readValue(response.getBody(), new TypeReference>>(){}); + + LocalDate birthdayDate = LocalDate.parse(respMap.get(0).get("birthday"), DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDateTime lastUpdateTime = LocalDateTime.parse(respMap.get(0).get("lastUpdate"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + assertNotNull(birthdayDate); + assertNotNull(lastUpdateTime); + } + + @Test + public void givenJsonFormatAnnotationAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException { + ResponseEntity response = restTemplate.getForEntity("http://localhost:8080/contacts/javaUtilDate", String.class); + + assertEquals(200, response.getStatusCodeValue()); + + List> respMap = mapper.readValue(response.getBody(), new TypeReference>>(){}); + + LocalDate birthdayDate = LocalDate.parse(respMap.get(0).get("birthday"), DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDateTime lastUpdateTime = LocalDateTime.parse(respMap.get(0).get("lastUpdate"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + assertNotNull(birthdayDate); + assertNotNull(lastUpdateTime); + } + + @Test + public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException { + ResponseEntity response = restTemplate.getForEntity("http://localhost:8080/contacts/plainWithJavaUtilDate", String.class); + + assertEquals(200, response.getStatusCodeValue()); + + List> respMap = mapper.readValue(response.getBody(), new TypeReference>>(){}); + + LocalDate birthdayDate = LocalDate.parse(respMap.get(0).get("birthday"), DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDateTime lastUpdateTime = LocalDateTime.parse(respMap.get(0).get("lastUpdate"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + assertNotNull(birthdayDate); + assertNotNull(lastUpdateTime); + } + + @Test(expected = DateTimeParseException.class) + public void givenDefaultDateFormatInAppPropertiesAndJava8DateType_whenGet_thenNotApplyFormat() throws IOException { + ResponseEntity response = restTemplate.getForEntity("http://localhost:8080/contacts/plain", String.class); + + assertEquals(200, response.getStatusCodeValue()); + + List> respMap = mapper.readValue(response.getBody(), new TypeReference>>(){}); + + LocalDate birthdayDate = LocalDate.parse(respMap.get(0).get("birthday"), DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDateTime lastUpdateTime = LocalDateTime.parse(respMap.get(0).get("lastUpdate"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + } + +} diff --git a/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java b/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java new file mode 100644 index 0000000000..554283d758 --- /dev/null +++ b/spring-boot/src/test/java/com/baeldung/jsondateformat/ContactAppWithObjectMapperCustomizerIntegrationTest.java @@ -0,0 +1,63 @@ +package com.baeldung.jsondateformat; + +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.ObjectMapper; +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.boot.test.web.client.TestRestTemplate; +import org.springframework.http.ResponseEntity; +import org.springframework.test.context.junit4.SpringRunner; + +import java.io.IOException; +import java.time.LocalDate; +import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; +import java.util.List; +import java.util.Map; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.springframework.boot.test.context.SpringBootTest.WebEnvironment.DEFINED_PORT; + +@RunWith(SpringRunner.class) +@SpringBootTest(webEnvironment = DEFINED_PORT, classes = ContactApp.class) +public class ContactAppWithObjectMapperCustomizerIntegrationTest { + + private final ObjectMapper mapper = new ObjectMapper(); + + @Autowired + TestRestTemplate restTemplate; + + @Test + public void givenDefaultDateFormatInAppPropertiesAndLegacyDateType_whenGet_thenReturnExpectedDateFormat() throws IOException { + ResponseEntity response = restTemplate.getForEntity("http://localhost:8080/contacts/plainWithJavaUtilDate", String.class); + + assertEquals(200, response.getStatusCodeValue()); + + List> respMap = mapper.readValue(response.getBody(), new TypeReference>>(){}); + + LocalDate birthdayDate = LocalDate.parse(respMap.get(0).get("birthday"), DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDateTime lastUpdateTime = LocalDateTime.parse(respMap.get(0).get("lastUpdate"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + assertNotNull(birthdayDate); + assertNotNull(lastUpdateTime); + } + + @Test + public void givenDefaultDateFormatInAppPropertiesAndJava8DateType_whenGet_thenReturnExpectedDateFormat() throws IOException { + ResponseEntity response = restTemplate.getForEntity("http://localhost:8080/contacts/plain", String.class); + + assertEquals(200, response.getStatusCodeValue()); + + List> respMap = mapper.readValue(response.getBody(), new TypeReference>>(){}); + + LocalDate birthdayDate = LocalDate.parse(respMap.get(0).get("birthday"), DateTimeFormatter.ofPattern("yyyy-MM-dd")); + LocalDateTime lastUpdateTime = LocalDateTime.parse(respMap.get(0).get("lastUpdate"), DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")); + + assertNotNull(birthdayDate); + assertNotNull(lastUpdateTime); + } + +} diff --git a/spring-cloud-bus/pom.xml b/spring-cloud-bus/pom.xml index 784e4cbae6..fdaf8c024f 100644 --- a/spring-cloud-bus/pom.xml +++ b/spring-cloud-bus/pom.xml @@ -6,8 +6,8 @@ com.baeldung.spring.cloud spring-cloud-bus 1.0.0-SNAPSHOT - pom spring-cloud-bus + pom parent-boot-1 diff --git a/spring-cloud-bus/spring-cloud-config-client/pom.xml b/spring-cloud-bus/spring-cloud-config-client/pom.xml index b2b69303bf..4994626ba5 100644 --- a/spring-cloud-bus/spring-cloud-config-client/pom.xml +++ b/spring-cloud-bus/spring-cloud-config-client/pom.xml @@ -3,9 +3,8 @@ 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-config-client - jar - spring-cloud-config-client + jar Demo Spring Cloud Config Client diff --git a/spring-cloud-bus/spring-cloud-config-server/pom.xml b/spring-cloud-bus/spring-cloud-config-server/pom.xml index f50b78ff18..51b447161e 100644 --- a/spring-cloud-bus/spring-cloud-config-server/pom.xml +++ b/spring-cloud-bus/spring-cloud-config-server/pom.xml @@ -3,9 +3,8 @@ 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-config-server - jar - spring-cloud-config-server + jar Demo Spring Cloud Config Server diff --git a/spring-cloud-data-flow/batch-job/pom.xml b/spring-cloud-data-flow/batch-job/pom.xml index 7bc2909f4c..04187badb4 100644 --- a/spring-cloud-data-flow/batch-job/pom.xml +++ b/spring-cloud-data-flow/batch-job/pom.xml @@ -5,9 +5,9 @@ org.baeldung.spring.cloud batch-job 0.0.1-SNAPSHOT - jar batch-job Demo project for Spring Boot + jar parent-boot-1 diff --git a/spring-cloud-data-flow/data-flow-server/pom.xml b/spring-cloud-data-flow/data-flow-server/pom.xml index a02d2984c1..cf583c216a 100644 --- a/spring-cloud-data-flow/data-flow-server/pom.xml +++ b/spring-cloud-data-flow/data-flow-server/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - data-flow-server 0.0.1-SNAPSHOT - jar data-flow-server + jar Demo project for Spring Boot diff --git a/spring-cloud-data-flow/data-flow-shell/pom.xml b/spring-cloud-data-flow/data-flow-shell/pom.xml index 3b155736c3..52cb204201 100644 --- a/spring-cloud-data-flow/data-flow-shell/pom.xml +++ b/spring-cloud-data-flow/data-flow-shell/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - data-flow-shell 0.0.1-SNAPSHOT - jar data-flow-shell + jar Demo project for Spring Boot diff --git a/spring-cloud-data-flow/etl/customer-mongodb-sink/pom.xml b/spring-cloud-data-flow/etl/customer-mongodb-sink/pom.xml index 1f16a02a98..c8b609fd70 100644 --- a/spring-cloud-data-flow/etl/customer-mongodb-sink/pom.xml +++ b/spring-cloud-data-flow/etl/customer-mongodb-sink/pom.xml @@ -2,11 +2,9 @@ 4.0.0 - customer-mongodb-sink - jar - customer-mongodb-sink + jar Example ETL Load Project diff --git a/spring-cloud-data-flow/etl/customer-transform/pom.xml b/spring-cloud-data-flow/etl/customer-transform/pom.xml index ed281b420a..5b2eb05fc8 100644 --- a/spring-cloud-data-flow/etl/customer-transform/pom.xml +++ b/spring-cloud-data-flow/etl/customer-transform/pom.xml @@ -2,11 +2,9 @@ 4.0.0 - customer-transform - jar - customer-transform + jar Example transform ETL step diff --git a/spring-cloud-data-flow/etl/pom.xml b/spring-cloud-data-flow/etl/pom.xml index 7d5040e8ad..55b2f34289 100644 --- a/spring-cloud-data-flow/etl/pom.xml +++ b/spring-cloud-data-flow/etl/pom.xml @@ -1,9 +1,9 @@ 4.0.0 - etl etl 0.0.1-SNAPSHOT + etl pom diff --git a/spring-cloud-data-flow/log-sink/pom.xml b/spring-cloud-data-flow/log-sink/pom.xml index 69de679c2a..ecabb91a98 100644 --- a/spring-cloud-data-flow/log-sink/pom.xml +++ b/spring-cloud-data-flow/log-sink/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - log-sink 0.0.1-SNAPSHOT - jar log-sink + jar Demo project for Spring Boot diff --git a/spring-cloud-data-flow/pom.xml b/spring-cloud-data-flow/pom.xml index b5ef5d2c2a..daf8ebd2c8 100644 --- a/spring-cloud-data-flow/pom.xml +++ b/spring-cloud-data-flow/pom.xml @@ -3,8 +3,8 @@ 4.0.0 spring-cloud-data-flow 0.0.1-SNAPSHOT - pom spring-cloud-data-flow + pom com.baeldung diff --git a/spring-cloud-data-flow/time-processor/pom.xml b/spring-cloud-data-flow/time-processor/pom.xml index e630df1865..de354ca698 100644 --- a/spring-cloud-data-flow/time-processor/pom.xml +++ b/spring-cloud-data-flow/time-processor/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - time-processor 0.0.1-SNAPSHOT - jar time-processor + jar Demo project for Spring Boot diff --git a/spring-cloud-data-flow/time-source/pom.xml b/spring-cloud-data-flow/time-source/pom.xml index 649af32cf0..a4d06e13d2 100644 --- a/spring-cloud-data-flow/time-source/pom.xml +++ b/spring-cloud-data-flow/time-source/pom.xml @@ -2,7 +2,6 @@ 4.0.0 - time-source 0.0.1-SNAPSHOT jar diff --git a/spring-cloud/pom.xml b/spring-cloud/pom.xml index 39cda888c5..baf86a4386 100644 --- a/spring-cloud/pom.xml +++ b/spring-cloud/pom.xml @@ -5,8 +5,8 @@ com.baeldung.spring.cloud spring-cloud 1.0.0-SNAPSHOT - pom spring-cloud + pom com.baeldung 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 1ae6d543fb..cc100833cd 100644 --- a/spring-cloud/spring-cloud-archaius/additional-sources-simple/pom.xml +++ b/spring-cloud/spring-cloud-archaius/additional-sources-simple/pom.xml @@ -5,8 +5,8 @@ 4.0.0 additional-sources-simple 1.0.0-SNAPSHOT - jar additional-sources-simple + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-archaius/basic-config/pom.xml b/spring-cloud/spring-cloud-archaius/basic-config/pom.xml index b5b091712d..be77eeb71c 100644 --- a/spring-cloud/spring-cloud-archaius/basic-config/pom.xml +++ b/spring-cloud/spring-cloud-archaius/basic-config/pom.xml @@ -5,8 +5,8 @@ 4.0.0 basic-config 1.0.0-SNAPSHOT - jar basic-config + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml b/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml index 2f3f2b084a..c3c830f197 100644 --- a/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml +++ b/spring-cloud/spring-cloud-archaius/extra-configs/pom.xml @@ -5,8 +5,8 @@ 4.0.0 extra-configs 1.0.0-SNAPSHOT - jar extra-configs + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-aws/pom.xml b/spring-cloud/spring-cloud-aws/pom.xml index 7edabd03f5..26c407a77e 100644 --- a/spring-cloud/spring-cloud-aws/pom.xml +++ b/spring-cloud/spring-cloud-aws/pom.xml @@ -4,9 +4,9 @@ 4.0.0 com.baeldung.spring.cloud spring-cloud-aws - jar spring-cloud-aws Spring Cloud AWS Examples + jar parent-boot-1 diff --git a/spring-cloud/spring-cloud-consul/pom.xml b/spring-cloud/spring-cloud-consul/pom.xml index 2a2714d597..1ca3d703b5 100644 --- a/spring-cloud/spring-cloud-consul/pom.xml +++ b/spring-cloud/spring-cloud-consul/pom.xml @@ -4,8 +4,8 @@ 4.0.0 org.baeldung spring-cloud-consul - jar spring-cloud-consul + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-contract/pom.xml b/spring-cloud/spring-cloud-contract/pom.xml index 3563d0ee58..4d4e8ad2c3 100644 --- a/spring-cloud/spring-cloud-contract/pom.xml +++ b/spring-cloud/spring-cloud-contract/pom.xml @@ -2,11 +2,11 @@ 4.0.0 - pom com.baeldung.spring.cloud spring-cloud-contract 1.0.0-SNAPSHOT spring-cloud-contract + pom com.baeldung.spring.cloud 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 fa9bf51bc3..7d00a9f463 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 @@ -2,14 +2,12 @@ 4.0.0 - com.baeldung.spring.cloud spring-cloud-contract-consumer 1.0.0-SNAPSHOT - jar - spring-cloud-contract-consumer Spring Cloud Consumer Sample + jar com.baeldung.spring.cloud @@ -18,12 +16,6 @@ .. - - UTF-8 - UTF-8 - 1.8 - - org.springframework.cloud @@ -54,4 +46,10 @@ test + + + UTF-8 + UTF-8 + 1.8 + 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 ac27dbb645..a6bd4e1be4 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 @@ -2,14 +2,12 @@ 4.0.0 - com.baeldung.spring.cloud spring-cloud-contract-producer 1.0.0-SNAPSHOT - jar - spring-cloud-contract-producer Spring Cloud Producer Sample + jar com.baeldung.spring.cloud @@ -18,13 +16,6 @@ .. - - UTF-8 - UTF-8 - 1.8 - Edgware.SR1 - - org.springframework.cloud @@ -70,5 +61,11 @@ + + UTF-8 + UTF-8 + 1.8 + Edgware.SR1 + diff --git a/spring-cloud/spring-cloud-eureka/pom.xml b/spring-cloud/spring-cloud-eureka/pom.xml index 99d8c0ed40..b59b415ee2 100644 --- a/spring-cloud/spring-cloud-eureka/pom.xml +++ b/spring-cloud/spring-cloud-eureka/pom.xml @@ -5,9 +5,9 @@ com.baeldung.spring.cloud spring-cloud-eureka 1.0.0-SNAPSHOT - pom spring-cloud-eureka Spring Cloud Eureka Server and Sample Clients + pom spring-cloud-eureka-server 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 5378095af0..c2d64ce237 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 @@ -4,9 +4,9 @@ 4.0.0 spring-cloud-eureka-client 1.0.0-SNAPSHOT - jar spring-cloud-eureka-client Spring Cloud Eureka Sample Client + jar com.baeldung.spring.cloud 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 f2057c8a76..84ba1e28fe 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 @@ -4,9 +4,9 @@ 4.0.0 spring-cloud-eureka-feign-client 1.0.0-SNAPSHOT - jar spring-cloud-eureka-feign-client Spring Cloud Eureka - Sample Feign Client + jar com.baeldung.spring.cloud 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 587aed6c49..f51f6d229d 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 @@ -4,9 +4,9 @@ 4.0.0 spring-cloud-eureka-server 1.0.0-SNAPSHOT - jar spring-cloud-eureka-server Spring Cloud Eureka Server Demo + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-functions/pom.xml b/spring-cloud/spring-cloud-functions/pom.xml index 5686fc8c64..9396ad0a55 100644 --- a/spring-cloud/spring-cloud-functions/pom.xml +++ b/spring-cloud/spring-cloud-functions/pom.xml @@ -6,9 +6,9 @@ com.baeldung.spring spring-cloud-functions 0.0.1-SNAPSHOT - jar spring-cloud-functions Demo project for Spring Cloud Function + jar org.springframework.boot 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 11b9275b46..a345d6856b 100644 --- a/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/feign-rest-consumer/pom.xml @@ -5,8 +5,8 @@ 4.0.0 feign-rest-consumer 1.0.0-SNAPSHOT - jar feign-rest-consumer + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-hystrix/pom.xml b/spring-cloud/spring-cloud-hystrix/pom.xml index 266644b4c3..51f6a4e82b 100644 --- a/spring-cloud/spring-cloud-hystrix/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/pom.xml @@ -6,8 +6,8 @@ com.baeldung.spring.cloud spring-cloud-hystrix 1.0.0-SNAPSHOT - pom spring-cloud-hystrix + pom com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml b/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml index 651f80fc92..ec2f6d1e55 100644 --- a/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/rest-consumer/pom.xml @@ -2,11 +2,10 @@ 4.0.0 - rest-consumer 1.0.0-SNAPSHOT - jar rest-consumer + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml b/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml index 8437ac6833..0f84fb7e23 100644 --- a/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml +++ b/spring-cloud/spring-cloud-hystrix/rest-producer/pom.xml @@ -2,12 +2,10 @@ 4.0.0 - rest-producer 1.0.0-SNAPSHOT - jar - rest-producer + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-kubernetes/liveness-example/pom.xml b/spring-cloud/spring-cloud-kubernetes/liveness-example/pom.xml index e963dafe67..9254718c81 100644 --- a/spring-cloud/spring-cloud-kubernetes/liveness-example/pom.xml +++ b/spring-cloud/spring-cloud-kubernetes/liveness-example/pom.xml @@ -2,6 +2,9 @@ + 4.0.0 + liveness-example + 1.0-SNAPSHOT org.springframework.boot @@ -10,17 +13,6 @@ - 4.0.0 - - liveness-example - 1.0-SNAPSHOT - - - UTF-8 - UTF-8 - 1.8 - - org.springframework.boot @@ -48,4 +40,10 @@ + + UTF-8 + UTF-8 + 1.8 + + \ No newline at end of file diff --git a/spring-cloud/spring-cloud-kubernetes/pom.xml b/spring-cloud/spring-cloud-kubernetes/pom.xml index de0718633e..51e1456358 100644 --- a/spring-cloud/spring-cloud-kubernetes/pom.xml +++ b/spring-cloud/spring-cloud-kubernetes/pom.xml @@ -5,15 +5,8 @@ com.baeldung.spring.cloud spring-cloud-kubernetes 1.0-SNAPSHOT - pom spring-cloud-kubernetes - - - demo-frontend - demo-backend - liveness-example - readiness-example - + pom parent-boot-1 @@ -21,5 +14,12 @@ 0.0.1-SNAPSHOT ../../parent-boot-1 + + + demo-frontend + demo-backend + liveness-example + readiness-example + \ No newline at end of file diff --git a/spring-cloud/spring-cloud-kubernetes/readiness-example/pom.xml b/spring-cloud/spring-cloud-kubernetes/readiness-example/pom.xml index fa85120d21..e22bb0a9fe 100644 --- a/spring-cloud/spring-cloud-kubernetes/readiness-example/pom.xml +++ b/spring-cloud/spring-cloud-kubernetes/readiness-example/pom.xml @@ -2,22 +2,16 @@ + 4.0.0 + readiness-example + 1.0-SNAPSHOT + org.springframework.boot spring-boot-starter-parent 1.5.17.RELEASE - 4.0.0 - - readiness-example - 1.0-SNAPSHOT - - - UTF-8 - UTF-8 - 1.8 - @@ -46,4 +40,10 @@ + + UTF-8 + UTF-8 + 1.8 + + \ 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 f78f58caa0..7f316f47fc 100644 --- a/spring-cloud/spring-cloud-rest/pom.xml +++ b/spring-cloud/spring-cloud-rest/pom.xml @@ -5,8 +5,8 @@ org.baeldung spring-cloud-rest 1.0.0-SNAPSHOT - pom spring-cloud-rest + pom com.baeldung.spring.cloud 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 d1139b1fa4..a196ed8531 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 @@ -5,9 +5,9 @@ org.baeldung spring-cloud-rest-books-api 0.0.1-SNAPSHOT - jar spring-cloud-rest-books-api Simple books API + jar parent-boot-1 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 a43829666c..7a71cdb13b 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 @@ -5,9 +5,9 @@ org.baeldung spring-cloud-rest-config-server 0.0.1-SNAPSHOT - jar spring-cloud-rest-config-server Spring Cloud REST configuration server + jar parent-boot-1 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 5b656d4342..7ce04f2815 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 @@ -5,9 +5,9 @@ org.baeldung spring-cloud-rest-discovery-server 0.0.1-SNAPSHOT - jar spring-cloud-rest-discovery-server Spring Cloud REST server + jar parent-boot-1 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 ef969e04e5..cd7749460e 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 @@ -5,9 +5,9 @@ org.baeldung spring-cloud-rest-reviews-api 0.0.1-SNAPSHOT - jar spring-cloud-rest-reviews-api Simple reviews API + jar parent-boot-1 diff --git a/spring-cloud/spring-cloud-ribbon-client/pom.xml b/spring-cloud/spring-cloud-ribbon-client/pom.xml index 12125f4cf3..f677009a41 100644 --- a/spring-cloud/spring-cloud-ribbon-client/pom.xml +++ b/spring-cloud/spring-cloud-ribbon-client/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-cloud-ribbon-client 0.0.1-SNAPSHOT - jar spring-cloud-ribbon-client + jar Introduction to Spring Cloud Rest Client with Netflix Ribbon diff --git a/spring-cloud/spring-cloud-security/auth-client/pom.xml b/spring-cloud/spring-cloud-security/auth-client/pom.xml index 5d15c6c726..4f64f470f0 100644 --- a/spring-cloud/spring-cloud-security/auth-client/pom.xml +++ b/spring-cloud/spring-cloud-security/auth-client/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 auth-client - jar auth-client + jar Spring Cloud Security APP Client Module diff --git a/spring-cloud/spring-cloud-security/auth-resource/pom.xml b/spring-cloud/spring-cloud-security/auth-resource/pom.xml index 0367baa990..22ee0528c3 100644 --- a/spring-cloud/spring-cloud-security/auth-resource/pom.xml +++ b/spring-cloud/spring-cloud-security/auth-resource/pom.xml @@ -2,11 +2,9 @@ 4.0.0 - auth-resource - jar - auth-resource + jar Spring Cloud Security APP Resource Module diff --git a/spring-cloud/spring-cloud-security/pom.xml b/spring-cloud/spring-cloud-security/pom.xml index 1cf8751548..2eecf579a5 100644 --- a/spring-cloud/spring-cloud-security/pom.xml +++ b/spring-cloud/spring-cloud-security/pom.xml @@ -3,9 +3,9 @@ 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-security - pom 1.0.0-SNAPSHOT spring-cloud-security + pom parent-boot-1 diff --git a/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml b/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml index 6f582576d8..8846773338 100644 --- a/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml +++ b/spring-cloud/spring-cloud-stream-starters/twitterhdfs/pom.xml @@ -4,9 +4,9 @@ 4.0.0 com.baeldung.twitterhdfs twitterhdfs - jar 1.0.0-SNAPSHOT twitterhdfs + jar parent-boot-1 diff --git a/spring-cloud/spring-cloud-stream/pom.xml b/spring-cloud/spring-cloud-stream/pom.xml index d62b959131..76a51cc3ca 100644 --- a/spring-cloud/spring-cloud-stream/pom.xml +++ b/spring-cloud/spring-cloud-stream/pom.xml @@ -4,8 +4,8 @@ 4.0.0 org.baeldung spring-cloud-stream - pom spring-cloud-stream + pom com.baeldung.spring.cloud 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 fa14d04087..1649cfc0b5 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 @@ -3,9 +3,9 @@ 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-rabbit - jar spring-cloud-stream-rabbit Simple Spring Cloud Stream + jar org.baeldung diff --git a/spring-cloud/spring-cloud-task/pom.xml b/spring-cloud/spring-cloud-task/pom.xml index 748cc378f1..7c2c0d17f2 100644 --- a/spring-cloud/spring-cloud-task/pom.xml +++ b/spring-cloud/spring-cloud-task/pom.xml @@ -5,8 +5,8 @@ com.baeldung.spring.cloud spring-cloud-task 1.0.0-SNAPSHOT - pom spring-cloud-task + pom parent-boot-1 diff --git a/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml b/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml index ca0de342a9..03bfe7b1cb 100644 --- a/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml +++ b/spring-cloud/spring-cloud-task/springcloudtasksink/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 SpringCloudTaskSink - jar SpringCloudTaskSink + jar Demo project for Spring Boot diff --git a/spring-cloud/spring-cloud-vault/pom.xml b/spring-cloud/spring-cloud-vault/pom.xml index 363de6e107..abfb0d06f3 100644 --- a/spring-cloud/spring-cloud-vault/pom.xml +++ b/spring-cloud/spring-cloud-vault/pom.xml @@ -2,12 +2,10 @@ 4.0.0 - org.baeldung.spring.cloud spring-cloud-vault - jar - spring-cloud-vault + jar Demo project for Spring Boot diff --git a/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml b/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml index 9243766b77..2da47cf40d 100644 --- a/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml +++ b/spring-cloud/spring-cloud-zookeeper/Greeting/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 Greeting - jar Greeting + jar com.baeldung.spring.cloud diff --git a/spring-cloud/spring-cloud-zookeeper/pom.xml b/spring-cloud/spring-cloud-zookeeper/pom.xml index 9661f2b71a..4ea9b22e9d 100644 --- a/spring-cloud/spring-cloud-zookeeper/pom.xml +++ b/spring-cloud/spring-cloud-zookeeper/pom.xml @@ -3,8 +3,8 @@ 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-zookeeper - pom spring-cloud-zookeeper + pom com.baeldung.spring.cloud 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 6a00b279c8..9c075ebfe3 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 @@ -4,9 +4,8 @@ 4.0.0 eureka-client 1.0.0-SNAPSHOT - jar - Spring Cloud Eureka Client + jar Spring Cloud Eureka Sample Client 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 9db3204f64..97933210de 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 @@ -2,12 +2,10 @@ 4.0.0 - eureka-server 1.0.0-SNAPSHOT - jar - Spring Cloud Eureka Server + jar Spring Cloud Eureka Server Demo @@ -27,7 +25,6 @@ commons-configuration ${commons-config.version} - 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 7e864499d4..fbae051277 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/bin/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/bin/pom.xml @@ -1,14 +1,13 @@ - 4.0.0 - + 4.0.0 com.baeldung.spring.cloud spring-cloud-zuul-eureka-integration 1.0.0-SNAPSHOT - pom Spring Cloud Zuul and Eureka Integration Spring Cloud Zuul and Eureka Integration + pom com.baeldung.spring.cloud @@ -17,16 +16,16 @@ .. + + zuul-server + eureka-server + eureka-client + + UTF-8 3.7.0 1.4.2.RELEASE 1.10 - - - zuul-server - eureka-server - eureka-client - 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 40462c57f4..1c2cb85da5 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,12 +1,14 @@ 4.0.0 + zuul-server + com.baeldung.spring.cloud spring-cloud-zuul-eureka-integration 1.0.0-SNAPSHOT - zuul-server + org.springframework.boot @@ -30,6 +32,7 @@ spring-boot-starter-security + 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 c4f7ae704a..0b479ec226 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 @@ -4,8 +4,8 @@ 4.0.0 eureka-client 1.0.0-SNAPSHOT - jar eureka-client + jar Spring Cloud Eureka Sample Client 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 0256ee7000..eea22779a6 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 @@ -4,8 +4,8 @@ 4.0.0 eureka-server 1.0.0-SNAPSHOT - jar eureka-server + jar Spring Cloud Eureka Server Demo diff --git a/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml b/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml index edd7b9d99e..7fe0cf6ac3 100644 --- a/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml +++ b/spring-cloud/spring-cloud-zuul-eureka-integration/pom.xml @@ -6,8 +6,8 @@ com.baeldung.spring.cloud spring-cloud-zuul-eureka-integration 1.0.0-SNAPSHOT - pom spring-cloud-zuul-eureka-integration + pom Spring Cloud Zuul and Eureka Integration diff --git a/spring-cloud/spring-cloud-zuul/pom.xml b/spring-cloud/spring-cloud-zuul/pom.xml index e387bacb4e..97e67f16d8 100644 --- a/spring-cloud/spring-cloud-zuul/pom.xml +++ b/spring-cloud/spring-cloud-zuul/pom.xml @@ -2,13 +2,11 @@ 4.0.0 - com.baeldung.spring.cloud spring-cloud-zuul 0.0.1-SNAPSHOT - jar - spring-cloud-zuul + jar Demo project for Spring Boot @@ -18,13 +16,6 @@ - - UTF-8 - UTF-8 - 1.8 - Finchley.SR1 - - org.springframework.boot @@ -76,5 +67,11 @@ - + + UTF-8 + UTF-8 + 1.8 + Finchley.SR1 + + diff --git a/spring-core/README.md b/spring-core/README.md index e5c359c11b..dcc15a4cb9 100644 --- a/spring-core/README.md +++ b/spring-core/README.md @@ -22,3 +22,4 @@ - [Spring Application Context Events](https://www.baeldung.com/spring-context-events) - [Unsatisfied Dependency in Spring](https://www.baeldung.com/spring-unsatisfied-dependency) - [What is a Spring Bean?](https://www.baeldung.com/spring-bean) +- [Spring PostConstruct and PreDestroy Annotations](https://www.baeldung.com/spring-postconstruct-predestroy) diff --git a/spring-core/pom.xml b/spring-core/pom.xml index f1e2e2a748..46f777c020 100644 --- a/spring-core/pom.xml +++ b/spring-core/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-core 0.0.1-SNAPSHOT - war spring-core + war com.baeldung diff --git a/spring-core/src/main/java/com/baeldung/di/spring/Account.java b/spring-core/src/main/java/com/baeldung/di/spring/Account.java new file mode 100644 index 0000000000..6d9883bda5 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/Account.java @@ -0,0 +1,27 @@ +package com.baeldung.di.spring; + +import org.springframework.stereotype.Component; + +@Component +public class Account { + + private String accountNumber; + private String type; + + public String getAccountNumber() { + return accountNumber; + } + + public void setAccountNumber(String accountNumber) { + this.accountNumber = accountNumber; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/AccountService.java b/spring-core/src/main/java/com/baeldung/di/spring/AccountService.java new file mode 100644 index 0000000000..75ba6bb3eb --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/AccountService.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public interface AccountService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/AccountServiceImpl.java b/spring-core/src/main/java/com/baeldung/di/spring/AccountServiceImpl.java new file mode 100644 index 0000000000..4a4baf7d92 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/AccountServiceImpl.java @@ -0,0 +1,8 @@ +package com.baeldung.di.spring; + +import org.springframework.stereotype.Component; + +@Component +public class AccountServiceImpl implements AccountService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/AudioBookService.java b/spring-core/src/main/java/com/baeldung/di/spring/AudioBookService.java new file mode 100644 index 0000000000..c82e5ed282 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/AudioBookService.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public interface AudioBookService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/AudioBookServiceImpl.java b/spring-core/src/main/java/com/baeldung/di/spring/AudioBookServiceImpl.java new file mode 100644 index 0000000000..53a544b65a --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/AudioBookServiceImpl.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public class AudioBookServiceImpl implements AudioBookService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/AuthorService.java b/spring-core/src/main/java/com/baeldung/di/spring/AuthorService.java new file mode 100644 index 0000000000..cfb525ddf9 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/AuthorService.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public interface AuthorService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/AuthorServiceImpl.java b/spring-core/src/main/java/com/baeldung/di/spring/AuthorServiceImpl.java new file mode 100644 index 0000000000..007eb29930 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/AuthorServiceImpl.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public class AuthorServiceImpl implements AuthorService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/BookService.java b/spring-core/src/main/java/com/baeldung/di/spring/BookService.java new file mode 100644 index 0000000000..8e693e687d --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/BookService.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public interface BookService { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/BookServiceImpl.java b/spring-core/src/main/java/com/baeldung/di/spring/BookServiceImpl.java new file mode 100644 index 0000000000..b4ea602234 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/BookServiceImpl.java @@ -0,0 +1,10 @@ +package com.baeldung.di.spring; + +import org.springframework.beans.factory.annotation.Autowired; + +public class BookServiceImpl implements BookService { + + @Autowired(required = false) + private AuthorService authorService; + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/Foo.java b/spring-core/src/main/java/com/baeldung/di/spring/Foo.java new file mode 100644 index 0000000000..9d9b5d0888 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/Foo.java @@ -0,0 +1,4 @@ +package com.baeldung.di.spring; + +public class Foo { +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/FooProcessor.java b/spring-core/src/main/java/com/baeldung/di/spring/FooProcessor.java new file mode 100644 index 0000000000..9baaaef7a3 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/FooProcessor.java @@ -0,0 +1,6 @@ +package com.baeldung.di.spring; + +public class FooProcessor { + + private Foo foo; +} \ No newline at end of file diff --git a/spring-core/src/main/java/com/baeldung/di/spring/PersonDao.java b/spring-core/src/main/java/com/baeldung/di/spring/PersonDao.java new file mode 100644 index 0000000000..8dde7ed1e0 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/PersonDao.java @@ -0,0 +1,5 @@ +package com.baeldung.di.spring; + +public interface PersonDao { + +} diff --git a/spring-core/src/main/java/com/baeldung/di/spring/PersonDaoImpl.java b/spring-core/src/main/java/com/baeldung/di/spring/PersonDaoImpl.java new file mode 100644 index 0000000000..efcc2e0f21 --- /dev/null +++ b/spring-core/src/main/java/com/baeldung/di/spring/PersonDaoImpl.java @@ -0,0 +1,8 @@ +package com.baeldung.di.spring; + +import org.springframework.stereotype.Component; + +@Component +public class PersonDaoImpl implements PersonDao { + +} \ No newline at end of file diff --git a/guice/src/main/java/com/baeldung/examples/spring/SpringBeansConfig.java b/spring-core/src/main/java/com/baeldung/di/spring/SpringBeansConfig.java similarity index 64% rename from guice/src/main/java/com/baeldung/examples/spring/SpringBeansConfig.java rename to spring-core/src/main/java/com/baeldung/di/spring/SpringBeansConfig.java index ef0c23142c..4cb6943fc9 100644 --- a/guice/src/main/java/com/baeldung/examples/spring/SpringBeansConfig.java +++ b/spring-core/src/main/java/com/baeldung/di/spring/SpringBeansConfig.java @@ -1,11 +1,8 @@ -package com.baeldung.examples.spring; +package com.baeldung.di.spring; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import com.baeldung.examples.common.AudioBookService; -import com.baeldung.examples.common.AudioBookServiceImpl; - @Configuration public class SpringBeansConfig { diff --git a/guice/src/main/java/com/baeldung/examples/spring/SpringMainConfig.java b/spring-core/src/main/java/com/baeldung/di/spring/SpringMainConfig.java similarity index 66% rename from guice/src/main/java/com/baeldung/examples/spring/SpringMainConfig.java rename to spring-core/src/main/java/com/baeldung/di/spring/SpringMainConfig.java index 1ced22288f..75066fd539 100644 --- a/guice/src/main/java/com/baeldung/examples/spring/SpringMainConfig.java +++ b/spring-core/src/main/java/com/baeldung/di/spring/SpringMainConfig.java @@ -1,16 +1,13 @@ -package com.baeldung.examples.spring; +package com.baeldung.di.spring; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import com.baeldung.examples.common.BookService; -import com.baeldung.examples.common.BookServiceImpl; - @Configuration @Import({ SpringBeansConfig.class }) -@ComponentScan("com.baeldung.examples") +@ComponentScan("com.baeldung.di.spring") public class SpringMainConfig { @Bean diff --git a/guice/src/main/java/com/baeldung/examples/spring/SpringPersonService.java b/spring-core/src/main/java/com/baeldung/di/spring/SpringPersonService.java similarity index 81% rename from guice/src/main/java/com/baeldung/examples/spring/SpringPersonService.java rename to spring-core/src/main/java/com/baeldung/di/spring/SpringPersonService.java index 1ab5642f31..b85c749982 100644 --- a/guice/src/main/java/com/baeldung/examples/spring/SpringPersonService.java +++ b/spring-core/src/main/java/com/baeldung/di/spring/SpringPersonService.java @@ -1,10 +1,8 @@ -package com.baeldung.examples.spring; +package com.baeldung.di.spring; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import com.baeldung.examples.common.PersonDao; - @Component public class SpringPersonService { diff --git a/guice/src/main/java/com/baeldung/examples/spring/UserService.java b/spring-core/src/main/java/com/baeldung/di/spring/UserService.java similarity index 77% rename from guice/src/main/java/com/baeldung/examples/spring/UserService.java rename to spring-core/src/main/java/com/baeldung/di/spring/UserService.java index 4173ef8208..330d7f7448 100644 --- a/guice/src/main/java/com/baeldung/examples/spring/UserService.java +++ b/spring-core/src/main/java/com/baeldung/di/spring/UserService.java @@ -1,10 +1,8 @@ -package com.baeldung.examples.spring; +package com.baeldung.di.spring; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; -import com.baeldung.examples.common.AccountService; - @Component public class UserService { diff --git a/guice/src/test/java/com/baeldung/examples/SpringUnitTest.java b/spring-core/src/test/java/com/baeldung/di/spring/SpringUnitTest.java similarity index 88% rename from guice/src/test/java/com/baeldung/examples/SpringUnitTest.java rename to spring-core/src/test/java/com/baeldung/di/spring/SpringUnitTest.java index 64e1eedcac..7df8dfac89 100644 --- a/guice/src/test/java/com/baeldung/examples/SpringUnitTest.java +++ b/spring-core/src/test/java/com/baeldung/di/spring/SpringUnitTest.java @@ -1,4 +1,4 @@ -package com.baeldung.examples; +package com.baeldung.di.spring; import static org.junit.Assert.assertNotNull; @@ -9,12 +9,6 @@ import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringRunner; -import com.baeldung.examples.common.AudioBookService; -import com.baeldung.examples.common.BookService; -import com.baeldung.examples.spring.SpringMainConfig; -import com.baeldung.examples.spring.SpringPersonService; -import com.baeldung.examples.spring.UserService; - @RunWith(SpringRunner.class) @ContextConfiguration(classes = { SpringMainConfig.class }) public class SpringUnitTest { diff --git a/spring-cucumber/pom.xml b/spring-cucumber/pom.xml index 2bc3201775..85980fbc60 100644 --- a/spring-cucumber/pom.xml +++ b/spring-cucumber/pom.xml @@ -5,9 +5,9 @@ com.baeldung spring-cucumber 0.0.1-SNAPSHOT - jar spring-cucumber Demo project for Spring Boot + jar parent-boot-2 diff --git a/spring-data-rest/pom.xml b/spring-data-rest/pom.xml index 2fe4715bac..772d6f2553 100644 --- a/spring-data-rest/pom.xml +++ b/spring-data-rest/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-data-rest 1.0 - jar spring-data-rest + jar Intro to Spring Data REST diff --git a/spring-dispatcher-servlet/pom.xml b/spring-dispatcher-servlet/pom.xml index 7ac291740e..2eeb37eef0 100644 --- a/spring-dispatcher-servlet/pom.xml +++ b/spring-dispatcher-servlet/pom.xml @@ -4,9 +4,9 @@ 4.0.0 com.baeldung spring-dispatcher-servlet - war 1.0.0 spring-dispatcher-servlet + war com.baeldung diff --git a/spring-ejb/pom.xml b/spring-ejb/pom.xml index 688f692757..712bfc66ab 100755 --- a/spring-ejb/pom.xml +++ b/spring-ejb/pom.xml @@ -4,8 +4,8 @@ 4.0.0 com.baeldung.spring.ejb spring-ejb - pom spring-ejb + pom Spring EJB Tutorial diff --git a/spring-ejb/spring-ejb-client/pom.xml b/spring-ejb/spring-ejb-client/pom.xml index 3d8003cbba..e0348d5ae3 100644 --- a/spring-ejb/spring-ejb-client/pom.xml +++ b/spring-ejb/spring-ejb-client/pom.xml @@ -2,11 +2,9 @@ 4.0.0 - spring-ejb-client - jar - spring-ejb-client + jar Spring EJB Client diff --git a/spring-ejb/spring-ejb-remote/pom.xml b/spring-ejb/spring-ejb-remote/pom.xml index 797cc3ac68..4f4ddb0b54 100644 --- a/spring-ejb/spring-ejb-remote/pom.xml +++ b/spring-ejb/spring-ejb-remote/pom.xml @@ -3,8 +3,8 @@ 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 - ejb spring-ejb-remote + ejb com.baeldung.spring.ejb diff --git a/spring-ejb/wildfly/pom.xml b/spring-ejb/wildfly/pom.xml index f50dad82f1..e2c3ffb50c 100644 --- a/spring-ejb/wildfly/pom.xml +++ b/spring-ejb/wildfly/pom.xml @@ -4,8 +4,8 @@ com.baeldung.wildfly wildfly 0.0.1-SNAPSHOT - pom wildfly + pom com.baeldung.spring.ejb diff --git a/spring-ejb/wildfly/widlfly-web/pom.xml b/spring-ejb/wildfly/widlfly-web/pom.xml index f0baac10dd..5eefada2fc 100644 --- a/spring-ejb/wildfly/widlfly-web/pom.xml +++ b/spring-ejb/wildfly/widlfly-web/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 widlfly-web - war widlfly-web + war com.baeldung.wildfly diff --git a/spring-ejb/wildfly/wildfly-ear/pom.xml b/spring-ejb/wildfly/wildfly-ear/pom.xml index 93d6df96e5..62d15a53dc 100644 --- a/spring-ejb/wildfly/wildfly-ear/pom.xml +++ b/spring-ejb/wildfly/wildfly-ear/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 wildfly-ear - ear wildfly-ear + ear com.baeldung.wildfly diff --git a/spring-ejb/wildfly/wildfly-ejb/pom.xml b/spring-ejb/wildfly/wildfly-ejb/pom.xml index 12bfc9c1bf..f03bfb341c 100644 --- a/spring-ejb/wildfly/wildfly-ejb/pom.xml +++ b/spring-ejb/wildfly/wildfly-ejb/pom.xml @@ -2,8 +2,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 wildfly-ejb - ejb wildfly-ejb + ejb com.baeldung.wildfly diff --git a/spring-freemarker/pom.xml b/spring-freemarker/pom.xml index 02f2a3fd06..c71643dc39 100644 --- a/spring-freemarker/pom.xml +++ b/spring-freemarker/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung.freemarker spring-freemarker - war 1.0-SNAPSHOT spring-freemarker + war com.baeldung diff --git a/spring-groovy/pom.xml b/spring-groovy/pom.xml index 42cdb93fd2..c26de0b6dd 100644 --- a/spring-groovy/pom.xml +++ b/spring-groovy/pom.xml @@ -1,12 +1,11 @@ 4.0.0 - com.baeldug spring-groovy 0.0.1-SNAPSHOT - jar spring-groovy + jar http://maven.apache.org diff --git a/spring-integration/pom.xml b/spring-integration/pom.xml index 8a5399ae0b..11a1e617aa 100644 --- a/spring-integration/pom.xml +++ b/spring-integration/pom.xml @@ -4,8 +4,8 @@ com.baeldung.samples.spring.integration spring-integration 1.0.0.BUILD-SNAPSHOT - jar spring-integration + jar http://www.springsource.org/spring-integration diff --git a/spring-jenkins-pipeline/pom.xml b/spring-jenkins-pipeline/pom.xml index 85336f9689..54b4cc478c 100644 --- a/spring-jenkins-pipeline/pom.xml +++ b/spring-jenkins-pipeline/pom.xml @@ -4,9 +4,9 @@ 4.0.0 spring-jenkins-pipeline 0.0.1-SNAPSHOT - jar spring-jenkins-pipeline Intro to Jenkins 2 and the power of pipelines + jar parent-boot-1 diff --git a/spring-jersey/pom.xml b/spring-jersey/pom.xml index b548de3701..c12f6a1241 100644 --- a/spring-jersey/pom.xml +++ b/spring-jersey/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-jersey 0.1-SNAPSHOT - war spring-jersey + war com.baeldung diff --git a/spring-jms/pom.xml b/spring-jms/pom.xml index 814875f77b..2ed58c0c95 100644 --- a/spring-jms/pom.xml +++ b/spring-jms/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-jms 0.0.1-SNAPSHOT - war spring-jms + war Introduction to Spring JMS diff --git a/spring-katharsis/pom.xml b/spring-katharsis/pom.xml index 756aae93d3..74786e7926 100644 --- a/spring-katharsis/pom.xml +++ b/spring-katharsis/pom.xml @@ -4,8 +4,8 @@ org.springframework.samples spring-katharsis 0.0.1-SNAPSHOT - war spring-katharsis + war parent-boot-1 diff --git a/spring-mobile/pom.xml b/spring-mobile/pom.xml index 4b04c3b8d5..71d0d05933 100644 --- a/spring-mobile/pom.xml +++ b/spring-mobile/pom.xml @@ -2,7 +2,6 @@ 4.0.0 - com.baeldung spring-mobile 1.0-SNAPSHOT diff --git a/spring-mockito/pom.xml b/spring-mockito/pom.xml index 481c818f39..766234c41b 100644 --- a/spring-mockito/pom.xml +++ b/spring-mockito/pom.xml @@ -2,13 +2,12 @@ 4.0.0 - com.baeldung spring-mockito 0.0.1-SNAPSHOT - jar spring-mockito Injecting Mockito Mocks into Spring Beans + jar parent-boot-2 diff --git a/spring-mvc-forms-thymeleaf/pom.xml b/spring-mvc-forms-thymeleaf/pom.xml index 504ad1dcb2..99bf465b44 100644 --- a/spring-mvc-forms-thymeleaf/pom.xml +++ b/spring-mvc-forms-thymeleaf/pom.xml @@ -2,10 +2,9 @@ 4.0.0 - spring-mvc-forms-thymeleaf - jar spring-mvc-forms-thymeleaf + jar spring forms examples using thymeleaf diff --git a/spring-mvc-java/pom.xml b/spring-mvc-java/pom.xml index 562df30318..552f62d9f7 100644 --- a/spring-mvc-java/pom.xml +++ b/spring-mvc-java/pom.xml @@ -5,7 +5,7 @@ spring-mvc-java 0.1-SNAPSHOT spring-mvc-java - war + war parent-spring-5 diff --git a/spring-mvc-kotlin/pom.xml b/spring-mvc-kotlin/pom.xml index 59b60ebd3c..fc76f58727 100644 --- a/spring-mvc-kotlin/pom.xml +++ b/spring-mvc-kotlin/pom.xml @@ -26,7 +26,6 @@ org.thymeleaf thymeleaf - org.thymeleaf thymeleaf-spring4 diff --git a/spring-mvc-simple/pom.xml b/spring-mvc-simple/pom.xml index 087ffea46d..8c2661cc27 100644 --- a/spring-mvc-simple/pom.xml +++ b/spring-mvc-simple/pom.xml @@ -19,11 +19,11 @@ spring-oxm ${spring-oxm.version} - - com.sun.mail - javax.mail - 1.6.1 - + + com.sun.mail + javax.mail + 1.6.1 + javax.servlet javax.servlet-api diff --git a/spring-mvc-velocity/pom.xml b/spring-mvc-velocity/pom.xml index dc5adcf3cf..60ac8b9c2f 100644 --- a/spring-mvc-velocity/pom.xml +++ b/spring-mvc-velocity/pom.xml @@ -1,9 +1,8 @@ 4.0.0 - 0.1-SNAPSHOT spring-mvc-velocity - + 0.1-SNAPSHOT spring-mvc-velocity war diff --git a/spring-mvc-xml/pom.xml b/spring-mvc-xml/pom.xml index 8e4a56c148..c6a6da406c 100644 --- a/spring-mvc-xml/pom.xml +++ b/spring-mvc-xml/pom.xml @@ -3,7 +3,6 @@ 4.0.0 0.1-SNAPSHOT spring-mvc-xml - spring-mvc-xml war diff --git a/spring-quartz/pom.xml b/spring-quartz/pom.xml index 77424c219e..58e72c1d51 100644 --- a/spring-quartz/pom.xml +++ b/spring-quartz/pom.xml @@ -2,13 +2,12 @@ 4.0.0 - com.baeldung spring-quartz spring-quartz 0.0.1-SNAPSHOT - jar Demo project for Scheduling in Spring with Quartz + jar parent-boot-2 diff --git a/spring-reactive-kotlin/pom.xml b/spring-reactive-kotlin/pom.xml index 7bd31396f7..90764111cb 100644 --- a/spring-reactive-kotlin/pom.xml +++ b/spring-reactive-kotlin/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-reactive-kotlin - jar spring-reactive-kotlin + jar Demo project for Spring Boot diff --git a/spring-reactor/pom.xml b/spring-reactor/pom.xml index c6ad99aea7..051244c9db 100644 --- a/spring-reactor/pom.xml +++ b/spring-reactor/pom.xml @@ -3,9 +3,9 @@ 4.0.0 com.baeldung spring-reactor - jar 1.0-SNAPSHOT spring-reactor + jar http://maven.apache.org diff --git a/spring-remoting/pom.xml b/spring-remoting/pom.xml index 060f33837c..e11c5b06f9 100644 --- a/spring-remoting/pom.xml +++ b/spring-remoting/pom.xml @@ -4,10 +4,10 @@ 4.0.0 com.baeldung spring-remoting - pom 1.0-SNAPSHOT spring-remoting Parent for all projects related to Spring Remoting, except remoting-hessian-burlap + pom diff --git a/spring-remoting/remoting-amqp/pom.xml b/spring-remoting/remoting-amqp/pom.xml index f52959046a..901ce69d6b 100644 --- a/spring-remoting/remoting-amqp/pom.xml +++ b/spring-remoting/remoting-amqp/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - remoting-amqp pom remoting-amqp diff --git a/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml b/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml index 98e0bc5df5..40b2fa7965 100644 --- a/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml +++ b/spring-remoting/remoting-amqp/remoting-amqp-client/pom.xml @@ -1,10 +1,9 @@ 4.0.0 - remoting-amqp-client - jar remoting-amqp-client + jar http://maven.apache.org diff --git a/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml b/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml index 7fe276f824..e8eb665815 100644 --- a/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml +++ b/spring-remoting/remoting-amqp/remoting-amqp-server/pom.xml @@ -1,10 +1,9 @@ 4.0.0 - remoting-amqp-server - jar remoting-amqp-server + jar http://maven.apache.org diff --git a/spring-remoting/remoting-hessian-burlap/pom.xml b/spring-remoting/remoting-hessian-burlap/pom.xml index 8c30e76296..e94d1bee82 100644 --- a/spring-remoting/remoting-hessian-burlap/pom.xml +++ b/spring-remoting/remoting-hessian-burlap/pom.xml @@ -4,9 +4,9 @@ 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 - pom remoting-hessian-burlap 1.0-SNAPSHOT + pom parent-boot-1 diff --git a/spring-remoting/remoting-http/pom.xml b/spring-remoting/remoting-http/pom.xml index 886a28b886..c4ed511bb5 100644 --- a/spring-remoting/remoting-http/pom.xml +++ b/spring-remoting/remoting-http/pom.xml @@ -4,9 +4,8 @@ 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 - pom - remoting-http + pom Parent for all modules related to HTTP Spring Remoting. diff --git a/spring-remoting/remoting-jms/remoting-jms-client/pom.xml b/spring-remoting/remoting-jms/remoting-jms-client/pom.xml index b7b1af5a1a..043ced8527 100644 --- a/spring-remoting/remoting-jms/remoting-jms-client/pom.xml +++ b/spring-remoting/remoting-jms/remoting-jms-client/pom.xml @@ -12,10 +12,6 @@ 1.0-SNAPSHOT - - UTF-8 - - org.springframework.boot @@ -34,4 +30,8 @@ + + UTF-8 + + \ No newline at end of file diff --git a/spring-remoting/remoting-jms/remoting-jms-server/pom.xml b/spring-remoting/remoting-jms/remoting-jms-server/pom.xml index 8a17cdb0a9..13de66977a 100644 --- a/spring-remoting/remoting-jms/remoting-jms-server/pom.xml +++ b/spring-remoting/remoting-jms/remoting-jms-server/pom.xml @@ -12,10 +12,6 @@ 1.0-SNAPSHOT - - UTF-8 - - org.springframework.boot @@ -34,4 +30,8 @@ + + UTF-8 + + \ No newline at end of file diff --git a/spring-remoting/remoting-rmi/pom.xml b/spring-remoting/remoting-rmi/pom.xml index b3b84786b8..7b6e807550 100644 --- a/spring-remoting/remoting-rmi/pom.xml +++ b/spring-remoting/remoting-rmi/pom.xml @@ -4,8 +4,8 @@ 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 - pom remoting-rmi + pom spring-remoting diff --git a/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml b/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml index 7fb4d2c1bc..2a19ebbbf6 100644 --- a/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml +++ b/spring-remoting/remoting-rmi/remoting-rmi-server/pom.xml @@ -12,10 +12,6 @@ 1.0-SNAPSHOT - - UTF-8 - - org.springframework.boot @@ -34,4 +30,8 @@ + + UTF-8 + + \ No newline at end of file diff --git a/spring-rest-hal-browser/pom.xml b/spring-rest-hal-browser/pom.xml index ee0a2c043d..413aad9e8c 100644 --- a/spring-rest-hal-browser/pom.xml +++ b/spring-rest-hal-browser/pom.xml @@ -7,19 +7,6 @@ spring-rest-hal-browser 1.0-SNAPSHOT spring-rest-hal-browser - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.8 - 1.8 - - - - @@ -46,9 +33,19 @@ h2 1.4.197 - - + + + + org.apache.maven.plugins + maven-compiler-plugin + + 1.8 + 1.8 + + + + \ No newline at end of file diff --git a/spring-rest-shell/pom.xml b/spring-rest-shell/pom.xml index 540b3d08eb..acf33cf98f 100644 --- a/spring-rest-shell/pom.xml +++ b/spring-rest-shell/pom.xml @@ -3,8 +3,8 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-rest-shell - jar spring-rest-shell + jar A simple project to demonstrate Spring REST Shell features. diff --git a/spring-security-acl/pom.xml b/spring-security-acl/pom.xml index c87c237233..8acc39b785 100644 --- a/spring-security-acl/pom.xml +++ b/spring-security-acl/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - spring-security-acl 0.0.1-SNAPSHOT - war spring-security-acl Spring Security ACL + war parent-boot-1 diff --git a/spring-security-angular/server/pom.xml b/spring-security-angular/server/pom.xml index 55269bb35f..6474bb5ed6 100644 --- a/spring-security-angular/server/pom.xml +++ b/spring-security-angular/server/pom.xml @@ -5,8 +5,8 @@ com.baeldung server 0.0.1-SNAPSHOT - jar server + jar Spring Security Angular diff --git a/spring-security-client/spring-security-jsp-authentication/pom.xml b/spring-security-client/spring-security-jsp-authentication/pom.xml index 9bb58863d9..9cb2a45331 100644 --- a/spring-security-client/spring-security-jsp-authentication/pom.xml +++ b/spring-security-client/spring-security-jsp-authentication/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-security-jsp-authentication 0.0.1-SNAPSHOT - war spring-security-jsp-authentication + war Spring Security JSP Authentication tag sample diff --git a/spring-security-client/spring-security-jsp-authorize/pom.xml b/spring-security-client/spring-security-jsp-authorize/pom.xml index 427ba7754a..ad4c9d105b 100644 --- a/spring-security-client/spring-security-jsp-authorize/pom.xml +++ b/spring-security-client/spring-security-jsp-authorize/pom.xml @@ -2,13 +2,12 @@ 4.0.0 - com.baeldung spring-security-jsp-authorize 0.0.1-SNAPSHOT - war spring-security-jsp-authorize Spring Security JSP Authorize tag sample + war parent-boot-1 diff --git a/spring-security-client/spring-security-jsp-config/pom.xml b/spring-security-client/spring-security-jsp-config/pom.xml index c0318a2c5c..02ea206738 100644 --- a/spring-security-client/spring-security-jsp-config/pom.xml +++ b/spring-security-client/spring-security-jsp-config/pom.xml @@ -5,9 +5,9 @@ com.baeldung spring-security-jsp-config 0.0.1-SNAPSHOT - war spring-security-jsp-config Spring Security JSP configuration + war parent-boot-1 diff --git a/spring-security-client/spring-security-mvc/pom.xml b/spring-security-client/spring-security-mvc/pom.xml index 6ddc6fbe65..75298026a8 100644 --- a/spring-security-client/spring-security-mvc/pom.xml +++ b/spring-security-client/spring-security-mvc/pom.xml @@ -5,9 +5,9 @@ com.baeldung spring-security-mvc 0.0.1-SNAPSHOT - war spring-security-mvc Spring Security MVC + war parent-boot-1 diff --git a/spring-security-client/spring-security-thymeleaf-authentication/pom.xml b/spring-security-client/spring-security-thymeleaf-authentication/pom.xml index 8e6a352af1..01d2c6bdbe 100644 --- a/spring-security-client/spring-security-thymeleaf-authentication/pom.xml +++ b/spring-security-client/spring-security-thymeleaf-authentication/pom.xml @@ -6,9 +6,9 @@ com.baeldung spring-security-thymeleaf-authentication 0.0.1-SNAPSHOT - war spring-security-thymeleaf-authentication Spring Security thymeleaf authentication tag sample + war parent-boot-1 diff --git a/spring-security-client/spring-security-thymeleaf-authorize/pom.xml b/spring-security-client/spring-security-thymeleaf-authorize/pom.xml index 52972c0241..8c600c1f81 100644 --- a/spring-security-client/spring-security-thymeleaf-authorize/pom.xml +++ b/spring-security-client/spring-security-thymeleaf-authorize/pom.xml @@ -6,9 +6,9 @@ com.baeldung spring-security-thymeleaf-authorize 0.0.1-SNAPSHOT - war spring-security-thymeleaf-authorize Spring Security thymeleaf authorize tag sample + war parent-boot-1 diff --git a/spring-security-client/spring-security-thymeleaf-config/pom.xml b/spring-security-client/spring-security-thymeleaf-config/pom.xml index 668f20c001..aeda999405 100644 --- a/spring-security-client/spring-security-thymeleaf-config/pom.xml +++ b/spring-security-client/spring-security-thymeleaf-config/pom.xml @@ -2,13 +2,12 @@ 4.0.0 - com.baeldung spring-security-thymeleaf-config 0.0.1-SNAPSHOT - war spring-security-thymeleaf-config Spring Security thymeleaf configuration sample project + war parent-boot-1 diff --git a/spring-security-mvc-boot/pom.xml b/spring-security-mvc-boot/pom.xml index 0a40b0b324..00d8f032c2 100644 --- a/spring-security-mvc-boot/pom.xml +++ b/spring-security-mvc-boot/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - com.baeldung spring-security-mvc-boot 0.0.1-SNAPSHOT - war spring-security-mvc-boot + war Spring Security MVC Boot diff --git a/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java b/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java index 66c7207e91..d6d022a110 100644 --- a/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java +++ b/spring-security-mvc-jsonview/src/main/java/com/baeldung/spring/SecurityJsonViewControllerAdvice.java @@ -31,6 +31,7 @@ public class SecurityJsonViewControllerAdvice extends AbstractMappingJacksonResp .collect(Collectors.toList()); if (jsonViews.size() == 1) { bodyContainer.setSerializationView(jsonViews.get(0)); + return; } throw new IllegalArgumentException("Ambiguous @JsonView declaration for roles "+ authorities.stream().map(GrantedAuthority::getAuthority).collect(Collectors.joining(","))); } diff --git a/spring-security-mvc-login/pom.xml b/spring-security-mvc-login/pom.xml index 5ee216548a..bbdff6fc2f 100644 --- a/spring-security-mvc-login/pom.xml +++ b/spring-security-mvc-login/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - com.baeldung spring-security-mvc-login 0.1-SNAPSHOT diff --git a/spring-security-mvc-persisted-remember-me/pom.xml b/spring-security-mvc-persisted-remember-me/pom.xml index 8b15e658e8..c65b7a30cb 100644 --- a/spring-security-mvc-persisted-remember-me/pom.xml +++ b/spring-security-mvc-persisted-remember-me/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - com.baeldung spring-security-mvc-persisted-remember-me 0.1-SNAPSHOT diff --git a/spring-security-mvc-session/pom.xml b/spring-security-mvc-session/pom.xml index 85c8475657..03c75b99e2 100644 --- a/spring-security-mvc-session/pom.xml +++ b/spring-security-mvc-session/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - com.baeldung spring-security-mvc-session 0.1-SNAPSHOT diff --git a/spring-security-openid/pom.xml b/spring-security-openid/pom.xml index 4343996e02..0b5eaf6270 100644 --- a/spring-security-openid/pom.xml +++ b/spring-security-openid/pom.xml @@ -2,10 +2,9 @@ 4.0.0 - spring-security-openid - war spring-security-openid + war Spring OpenID sample project diff --git a/spring-security-react/pom.xml b/spring-security-react/pom.xml index 32817945be..eaf10791bc 100644 --- a/spring-security-react/pom.xml +++ b/spring-security-react/pom.xml @@ -3,7 +3,6 @@ 4.0.0 spring-security-react 0.1-SNAPSHOT - spring-security-react war diff --git a/spring-security-rest-custom/pom.xml b/spring-security-rest-custom/pom.xml index 66ad087bf6..8fdcb509ee 100644 --- a/spring-security-rest-custom/pom.xml +++ b/spring-security-rest-custom/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - com.baeldung spring-security-rest-custom 0.1-SNAPSHOT diff --git a/spring-security-sso/pom.xml b/spring-security-sso/pom.xml index 4b297a91b5..707f516da2 100644 --- a/spring-security-sso/pom.xml +++ b/spring-security-sso/pom.xml @@ -4,7 +4,6 @@ org.baeldung spring-security-sso 1.0.0-SNAPSHOT - spring-security-sso pom diff --git a/spring-security-sso/spring-security-sso-auth-server/pom.xml b/spring-security-sso/spring-security-sso-auth-server/pom.xml index ff76f377c6..3c8f04a056 100644 --- a/spring-security-sso/spring-security-sso-auth-server/pom.xml +++ b/spring-security-sso/spring-security-sso-auth-server/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - spring-security-sso-auth-server spring-security-sso-auth-server war @@ -13,12 +12,10 @@ - org.springframework.boot spring-boot-starter-web - org.springframework.security.oauth spring-security-oauth2 diff --git a/spring-security-sso/spring-security-sso-ui-2/pom.xml b/spring-security-sso/spring-security-sso-ui-2/pom.xml index e4ccb82fea..a6cf5e5386 100644 --- a/spring-security-sso/spring-security-sso-ui-2/pom.xml +++ b/spring-security-sso/spring-security-sso-ui-2/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - spring-security-sso-ui-2 spring-security-sso-ui-2 war diff --git a/spring-security-sso/spring-security-sso-ui/pom.xml b/spring-security-sso/spring-security-sso-ui/pom.xml index a946db4c3b..7edcee82c8 100644 --- a/spring-security-sso/spring-security-sso-ui/pom.xml +++ b/spring-security-sso/spring-security-sso-ui/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - spring-security-sso-ui spring-security-sso-ui war diff --git a/spring-security-stormpath/pom.xml b/spring-security-stormpath/pom.xml index 4f19921fbd..dd6037a22c 100644 --- a/spring-security-stormpath/pom.xml +++ b/spring-security-stormpath/pom.xml @@ -3,10 +3,11 @@ 4.0.0 com.baeldung spring-security-stormpath - war 1.0-SNAPSHOT spring-security-stormpath + war http://maven.apache.org + abhinabkanrar@gmail.com diff --git a/spring-security-thymeleaf/pom.xml b/spring-security-thymeleaf/pom.xml index d8b476683a..732eb1dc1d 100644 --- a/spring-security-thymeleaf/pom.xml +++ b/spring-security-thymeleaf/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - com.baeldung spring-security-thymeleaf 0.0.1-SNAPSHOT - jar spring-security-thymeleaf + jar Spring Security with Thymeleaf tutorial diff --git a/spring-security-x509/pom.xml b/spring-security-x509/pom.xml index 658840e866..db7def0c02 100644 --- a/spring-security-x509/pom.xml +++ b/spring-security-x509/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-security-x509 0.0.1-SNAPSHOT - pom spring-security-x509 + pom parent-boot-1 diff --git a/spring-security-x509/spring-security-x509-basic-auth/pom.xml b/spring-security-x509/spring-security-x509-basic-auth/pom.xml index 5b68a8e63b..0bbd5d3d3d 100644 --- a/spring-security-x509/spring-security-x509-basic-auth/pom.xml +++ b/spring-security-x509/spring-security-x509-basic-auth/pom.xml @@ -4,8 +4,8 @@ 4.0.0 spring-security-x509-basic-auth 0.0.1-SNAPSHOT - jar spring-security-x509-basic-auth + jar Spring x.509 Authentication Demo diff --git a/spring-security-x509/spring-security-x509-client-auth/pom.xml b/spring-security-x509/spring-security-x509-client-auth/pom.xml index 47ec7f971d..3e2e18223a 100644 --- a/spring-security-x509/spring-security-x509-client-auth/pom.xml +++ b/spring-security-x509/spring-security-x509-client-auth/pom.xml @@ -4,8 +4,8 @@ 4.0.0 spring-security-x509-client-auth 0.0.1-SNAPSHOT - jar spring-security-x509-client-auth + jar Spring x.509 Client Authentication Demo diff --git a/spring-session/pom.xml b/spring-session/pom.xml index 28dde40272..bcdbaf2406 100644 --- a/spring-session/pom.xml +++ b/spring-session/pom.xml @@ -4,7 +4,6 @@ org.baeldung spring-session 1.0.0-SNAPSHOT - spring-session pom diff --git a/spring-session/spring-session-jdbc/pom.xml b/spring-session/spring-session-jdbc/pom.xml index ce6b5f5908..a98c4b3429 100644 --- a/spring-session/spring-session-jdbc/pom.xml +++ b/spring-session/spring-session-jdbc/pom.xml @@ -6,8 +6,8 @@ com.baeldung spring-session-jdbc 0.0.1-SNAPSHOT - jar spring-session-jdbc + jar Spring Session with JDBC tutorial diff --git a/spring-sleuth/pom.xml b/spring-sleuth/pom.xml index c693466ab0..2387915c79 100644 --- a/spring-sleuth/pom.xml +++ b/spring-sleuth/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-sleuth 1.0.0-SNAPSHOT - jar spring-sleuth + jar parent-boot-2 diff --git a/spring-social-login/pom.xml b/spring-social-login/pom.xml index 6b7b90443a..e948c908d4 100644 --- a/spring-social-login/pom.xml +++ b/spring-social-login/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - spring-social-login spring-social-login war diff --git a/spring-static-resources/pom.xml b/spring-static-resources/pom.xml index 92f6616839..aedf88e384 100644 --- a/spring-static-resources/pom.xml +++ b/spring-static-resources/pom.xml @@ -5,8 +5,8 @@ com.baeldung spring-static-resources 0.1.0-SNAPSHOT - war spring-static-resources + war com.baeldung diff --git a/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml b/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml index c175ea48b3..320745b6e5 100644 --- a/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml +++ b/spring-swagger-codegen/spring-swagger-codegen-api-client/pom.xml @@ -1,12 +1,12 @@ 4.0.0 - spring-swagger-codegen-api-client - jar spring-swagger-codegen-api-client https://github.com/swagger-api/swagger-codegen Swagger Java + jar + scm:git:git@github.com:swagger-api/swagger-codegen.git scm:git:git@github.com:swagger-api/swagger-codegen.git @@ -20,6 +20,7 @@ repo + Swagger diff --git a/spring-thymeleaf/pom.xml b/spring-thymeleaf/pom.xml index 78f95fe1df..cdc2ed25ae 100644 --- a/spring-thymeleaf/pom.xml +++ b/spring-thymeleaf/pom.xml @@ -4,8 +4,8 @@ com.baeldung spring-thymeleaf 0.1-SNAPSHOT - war spring-thymeleaf + war com.baeldung diff --git a/spring-vault/pom.xml b/spring-vault/pom.xml index aad6da1cc3..ccad71c024 100644 --- a/spring-vault/pom.xml +++ b/spring-vault/pom.xml @@ -4,12 +4,11 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 - com.baeldung spring-vault 0.0.1-SNAPSHOT - jar spring-vault + jar Spring Vault sample project diff --git a/spring-vertx/pom.xml b/spring-vertx/pom.xml index 7a0bdc81d0..1a0e1c0223 100644 --- a/spring-vertx/pom.xml +++ b/spring-vertx/pom.xml @@ -3,9 +3,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 spring-vertx - jar spring-vertx A demo project with vertx spring integration + jar parent-boot-2 diff --git a/spring-webflux-amqp/pom.xml b/spring-webflux-amqp/pom.xml index 0868e14717..a8346458a0 100755 --- a/spring-webflux-amqp/pom.xml +++ b/spring-webflux-amqp/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - org.baeldung.spring spring-webflux-amqp 1.0.0-SNAPSHOT - jar spring-webflux-amqp + jar Spring WebFlux AMQP Sample diff --git a/spring-zuul/pom.xml b/spring-zuul/pom.xml index a8c891cd89..d00a932168 100644 --- a/spring-zuul/pom.xml +++ b/spring-zuul/pom.xml @@ -2,7 +2,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 - com.baeldung spring-zuul 1.0.0-SNAPSHOT diff --git a/spring-zuul/spring-zuul-foos-resource/pom.xml b/spring-zuul/spring-zuul-foos-resource/pom.xml index 70e39db4aa..4fe4e1dbbc 100644 --- a/spring-zuul/spring-zuul-foos-resource/pom.xml +++ b/spring-zuul/spring-zuul-foos-resource/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - spring-zuul-foos-resource spring-zuul-foos-resource war diff --git a/spring-zuul/spring-zuul-ui/pom.xml b/spring-zuul/spring-zuul-ui/pom.xml index 159decd331..619e6c6b78 100644 --- a/spring-zuul/spring-zuul-ui/pom.xml +++ b/spring-zuul/spring-zuul-ui/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - spring-zuul-ui spring-zuul-ui war diff --git a/stripe/pom.xml b/stripe/pom.xml index 1e13612fb5..b0cb194bfe 100644 --- a/stripe/pom.xml +++ b/stripe/pom.xml @@ -2,13 +2,12 @@ 4.0.0 - com.baeldung.stripe stripe 0.0.1-SNAPSHOT - jar Stripe Demo project for Stripe API + jar parent-boot-1 diff --git a/struts-2/pom.xml b/struts-2/pom.xml index ac8579d9e0..7f0fba727d 100644 --- a/struts-2/pom.xml +++ b/struts-2/pom.xml @@ -4,8 +4,8 @@ com.baeldung struts-2 0.0.1-SNAPSHOT - pom struts-2 + pom com.baeldung diff --git a/testing-modules/groovy-spock/pom.xml b/testing-modules/groovy-spock/pom.xml index 3dd01c29ab..2a058e5358 100644 --- a/testing-modules/groovy-spock/pom.xml +++ b/testing-modules/groovy-spock/pom.xml @@ -5,8 +5,8 @@ org.spockframework groovy-spock 1.0-SNAPSHOT - jar groovy-spock + jar com.baeldung diff --git a/testing-modules/junit-5/README.md b/testing-modules/junit-5/README.md index 1fbd7a4a5e..4ed01e7fa9 100644 --- a/testing-modules/junit-5/README.md +++ b/testing-modules/junit-5/README.md @@ -16,3 +16,4 @@ - [Running JUnit Tests Programmatically, from a Java Application](https://www.baeldung.com/junit-tests-run-programmatically-from-java) - [Testing an Abstract Class With JUnit](https://www.baeldung.com/junit-test-abstract-class) - [A Quick JUnit vs TestNG Comparison](http://www.baeldung.com/junit-vs-testng) +- [Guide to JUnit 5 Parameterized Tests](https://www.baeldung.com/parameterized-tests-junit-5) diff --git a/testing-modules/junit5-migration/pom.xml b/testing-modules/junit5-migration/pom.xml index 9d9d418774..536953afc8 100644 --- a/testing-modules/junit5-migration/pom.xml +++ b/testing-modules/junit5-migration/pom.xml @@ -1,9 +1,7 @@ - 4.0.0 - junit5-migration 1.0-SNAPSHOT junit5-migration diff --git a/testing-modules/load-testing-comparison/pom.xml b/testing-modules/load-testing-comparison/pom.xml index 42614d310b..63472d0467 100644 --- a/testing-modules/load-testing-comparison/pom.xml +++ b/testing-modules/load-testing-comparison/pom.xml @@ -13,19 +13,6 @@ ../../pom.xml - - 1.8 - 1.8 - UTF-8 - 2.11.12 - 2.2.5 - 3.2.2 - 2.2.1 - 5.0 - 3.11 - 2.0.5.RELEASE - - io.gatling @@ -146,4 +133,18 @@ + + + 1.8 + 1.8 + UTF-8 + 2.11.12 + 2.2.5 + 3.2.2 + 2.2.1 + 5.0 + 3.11 + 2.0.5.RELEASE + + \ No newline at end of file diff --git a/testing-modules/mockito-2/pom.xml b/testing-modules/mockito-2/pom.xml index 5f60566566..e319dd9edd 100644 --- a/testing-modules/mockito-2/pom.xml +++ b/testing-modules/mockito-2/pom.xml @@ -4,8 +4,8 @@ com.baeldung mockito-2 0.0.1-SNAPSHOT - jar mockito-2 + jar com.baeldung diff --git a/testing-modules/mocks/pom.xml b/testing-modules/mocks/pom.xml index 6473f07c13..ecc8b61a6d 100644 --- a/testing-modules/mocks/pom.xml +++ b/testing-modules/mocks/pom.xml @@ -1,6 +1,9 @@ 4.0.0 + mocks + mocks + pom com.baeldung @@ -9,10 +12,6 @@ ../../ - mocks - mocks - pom - mock-comparisons jmockit diff --git a/testing-modules/parallel-tests-junit/math-test-functions/pom.xml b/testing-modules/parallel-tests-junit/math-test-functions/pom.xml index 18d2b562f3..a3569714ef 100644 --- a/testing-modules/parallel-tests-junit/math-test-functions/pom.xml +++ b/testing-modules/parallel-tests-junit/math-test-functions/pom.xml @@ -4,17 +4,16 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 + math-test-functions + math-test-functions + http://maven.apache.org + com.baeldung parallel-tests-junit 0.0.1-SNAPSHOT - math-test-functions - math-test-functions - http://maven.apache.org - - UTF-8 - + junit @@ -23,6 +22,7 @@ test + @@ -45,4 +45,8 @@ + + + UTF-8 + diff --git a/testing-modules/parallel-tests-junit/pom.xml b/testing-modules/parallel-tests-junit/pom.xml index ecca8b3930..f400a5ae07 100644 --- a/testing-modules/parallel-tests-junit/pom.xml +++ b/testing-modules/parallel-tests-junit/pom.xml @@ -1,14 +1,15 @@ - 4.0.0 - com.baeldung - parallel-tests-junit - 0.0.1-SNAPSHOT - pom - parallel-tests-junit - - - math-test-functions - string-test-functions - + 4.0.0 + com.baeldung + parallel-tests-junit + 0.0.1-SNAPSHOT + parallel-tests-junit + pom + + + math-test-functions + string-test-functions + + diff --git a/testing-modules/parallel-tests-junit/string-test-functions/pom.xml b/testing-modules/parallel-tests-junit/string-test-functions/pom.xml index af61cfce8e..7fa09ff493 100644 --- a/testing-modules/parallel-tests-junit/string-test-functions/pom.xml +++ b/testing-modules/parallel-tests-junit/string-test-functions/pom.xml @@ -4,17 +4,15 @@ xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> 4.0.0 + string-test-functions + string-test-functions + http://maven.apache.org + com.baeldung parallel-tests-junit 0.0.1-SNAPSHOT - string-test-functions - string-test-functions - http://maven.apache.org - - UTF-8 - @@ -24,6 +22,7 @@ test + @@ -38,4 +37,8 @@ + + + UTF-8 + diff --git a/testing-modules/rest-testing/pom.xml b/testing-modules/rest-testing/pom.xml index 2fa303a98e..2b1f146f0f 100644 --- a/testing-modules/rest-testing/pom.xml +++ b/testing-modules/rest-testing/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - com.baeldung rest-testing 0.1-SNAPSHOT diff --git a/testing-modules/testng/pom.xml b/testing-modules/testng/pom.xml index a9f680aafb..8389604717 100644 --- a/testing-modules/testng/pom.xml +++ b/testing-modules/testng/pom.xml @@ -4,8 +4,8 @@ 4.0.0 testng 0.1.0-SNAPSHOT - jar testng + jar com.baeldung diff --git a/undertow/pom.xml b/undertow/pom.xml index d000956aee..1c2cc3aa36 100644 --- a/undertow/pom.xml +++ b/undertow/pom.xml @@ -1,12 +1,11 @@ 4.0.0 - com.baeldung.undertow undertow - jar 1.0-SNAPSHOT undertow + jar http://maven.apache.org diff --git a/vaadin/pom.xml b/vaadin/pom.xml index c34ffa3636..d24b3dff1b 100644 --- a/vaadin/pom.xml +++ b/vaadin/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - org.test vaadin - war 1.0-SNAPSHOT Vaadin + war parent-boot-2 diff --git a/vertx/pom.xml b/vertx/pom.xml index 7e494c5914..befd4c45bb 100644 --- a/vertx/pom.xml +++ b/vertx/pom.xml @@ -2,7 +2,6 @@ 4.0.0 - com.baeldung vertx 1.0-SNAPSHOT diff --git a/video-tutorials/pom.xml b/video-tutorials/pom.xml index ca3b39904f..a798f77863 100644 --- a/video-tutorials/pom.xml +++ b/video-tutorials/pom.xml @@ -1,12 +1,11 @@ 4.0.0 - com.baeldung video-tutorials 1.0.0-SNAPSHOT - pom video-tutorials + pom com.baeldung diff --git a/vraptor/pom.xml b/vraptor/pom.xml index 97005bd158..214a44cede 100644 --- a/vraptor/pom.xml +++ b/vraptor/pom.xml @@ -4,8 +4,8 @@ com.baeldung vraptor 1.0.0 - war vraptor + war A demo project to start using VRaptor 4 diff --git a/wicket/pom.xml b/wicket/pom.xml index 99be467167..80c728e3a5 100644 --- a/wicket/pom.xml +++ b/wicket/pom.xml @@ -2,12 +2,11 @@ 4.0.0 - com.baeldung.wicket.examples wicket - war 1.0-SNAPSHOT Wicket + war com.baeldung diff --git a/xstream/pom.xml b/xstream/pom.xml index 64c8198082..f75e10fc7d 100644 --- a/xstream/pom.xml +++ b/xstream/pom.xml @@ -1,7 +1,6 @@ 4.0.0 - org.baeldung xstream 0.0.1-SNAPSHOT