diff --git a/akka-modules/akka-http/pom.xml b/akka-modules/akka-http/pom.xml index cf7e0b95ab..9372107fc9 100644 --- a/akka-modules/akka-http/pom.xml +++ b/akka-modules/akka-http/pom.xml @@ -15,22 +15,22 @@ com.typesafe.akka - akka-http_2.12 + akka-http_${scala.version} ${akka.http.version} com.typesafe.akka - akka-stream_2.12 + akka-stream_${scala.version} ${akka.stream.version} com.typesafe.akka - akka-http-jackson_2.12 + akka-http-jackson_${scala.version} ${akka.http.version} com.typesafe.akka - akka-http-testkit_2.12 + akka-http-testkit_${scala.version} ${akka.http.version} test diff --git a/akka-modules/akka-streams/pom.xml b/akka-modules/akka-streams/pom.xml index b563d07400..adf6e9b3d9 100644 --- a/akka-modules/akka-streams/pom.xml +++ b/akka-modules/akka-streams/pom.xml @@ -27,7 +27,6 @@ 2.5.2 - 2.11 \ No newline at end of file diff --git a/akka-modules/pom.xml b/akka-modules/pom.xml index 0e3563f31a..3a9d5e41ff 100644 --- a/akka-modules/pom.xml +++ b/akka-modules/pom.xml @@ -30,4 +30,8 @@ + + 2.12 + + \ No newline at end of file diff --git a/akka-modules/spring-akka/pom.xml b/akka-modules/spring-akka/pom.xml index c43d850462..7451a40b86 100644 --- a/akka-modules/spring-akka/pom.xml +++ b/akka-modules/spring-akka/pom.xml @@ -45,7 +45,6 @@ 4.3.4.RELEASE 2.4.14 - 2.11 \ No newline at end of file diff --git a/algorithms-modules/algorithms-genetic/pom.xml b/algorithms-modules/algorithms-genetic/pom.xml index c18ba0e7f1..ff6afde191 100644 --- a/algorithms-modules/algorithms-genetic/pom.xml +++ b/algorithms-modules/algorithms-genetic/pom.xml @@ -38,9 +38,7 @@ - 3.6.1 3.7.0 - 1.11 \ No newline at end of file diff --git a/algorithms-modules/algorithms-miscellaneous-1/pom.xml b/algorithms-modules/algorithms-miscellaneous-1/pom.xml index 62c9738f1a..a1ac607c29 100644 --- a/algorithms-modules/algorithms-miscellaneous-1/pom.xml +++ b/algorithms-modules/algorithms-miscellaneous-1/pom.xml @@ -63,10 +63,7 @@ - 3.6.1 - 1.11 3.3.0 - 2.7 \ No newline at end of file diff --git a/algorithms-modules/algorithms-miscellaneous-2/pom.xml b/algorithms-modules/algorithms-miscellaneous-2/pom.xml index f3b41cb7f8..ca14533e82 100644 --- a/algorithms-modules/algorithms-miscellaneous-2/pom.xml +++ b/algorithms-modules/algorithms-miscellaneous-2/pom.xml @@ -68,12 +68,8 @@ - 3.6.1 - 1.0.1 1.0.1 1.0.1 - 1.11 - 2.7 \ No newline at end of file diff --git a/algorithms-modules/algorithms-miscellaneous-5/pom.xml b/algorithms-modules/algorithms-miscellaneous-5/pom.xml index 26b445555b..97c61cb88f 100644 --- a/algorithms-modules/algorithms-miscellaneous-5/pom.xml +++ b/algorithms-modules/algorithms-miscellaneous-5/pom.xml @@ -36,10 +36,4 @@ - - 1.0.1 - 1.11 - 3.6.1 - - \ No newline at end of file diff --git a/algorithms-modules/algorithms-miscellaneous-6/pom.xml b/algorithms-modules/algorithms-miscellaneous-6/pom.xml index 34eae2e2b9..5759b2cc6e 100644 --- a/algorithms-modules/algorithms-miscellaneous-6/pom.xml +++ b/algorithms-modules/algorithms-miscellaneous-6/pom.xml @@ -32,8 +32,4 @@ - - 3.6.1 - - \ No newline at end of file diff --git a/algorithms-modules/algorithms-sorting-2/pom.xml b/algorithms-modules/algorithms-sorting-2/pom.xml index d81df0adec..d0f3bdb76f 100644 --- a/algorithms-modules/algorithms-sorting-2/pom.xml +++ b/algorithms-modules/algorithms-sorting-2/pom.xml @@ -31,9 +31,4 @@ - - 3.6.1 - 1.11 - - \ No newline at end of file diff --git a/algorithms-modules/algorithms-sorting/pom.xml b/algorithms-modules/algorithms-sorting/pom.xml index eeccbf814d..f3ce3fc020 100644 --- a/algorithms-modules/algorithms-sorting/pom.xml +++ b/algorithms-modules/algorithms-sorting/pom.xml @@ -32,9 +32,4 @@ - - 3.6.1 - 1.11 - - \ No newline at end of file diff --git a/algorithms-modules/pom.xml b/algorithms-modules/pom.xml index 4a5f36c944..342662ce9c 100644 --- a/algorithms-modules/pom.xml +++ b/algorithms-modules/pom.xml @@ -27,4 +27,11 @@ algorithms-sorting-2 + + 1.11 + 3.6.1 + 2.7 + 1.0.1 + + \ No newline at end of file diff --git a/aws-modules/aws-lambda/lambda/pom.xml b/aws-modules/aws-lambda/lambda/pom.xml index 8bfe7a0ade..edf52d0581 100644 --- a/aws-modules/aws-lambda/lambda/pom.xml +++ b/aws-modules/aws-lambda/lambda/pom.xml @@ -98,8 +98,6 @@ 1.3.0 1.2.0 2.8.2 - 1.11.241 - 3.0.0 \ No newline at end of file diff --git a/aws-modules/aws-miscellaneous/pom.xml b/aws-modules/aws-miscellaneous/pom.xml index 888a2a561f..2b07f1153b 100644 --- a/aws-modules/aws-miscellaneous/pom.xml +++ b/aws-modules/aws-miscellaneous/pom.xml @@ -112,12 +112,10 @@ 1.3.0 1.1.0 2.8.0 - 1.11.290 1.11.86 https://s3-us-west-2.amazonaws.com/dynamodb-local/release 1.10.L001 0.9.4.0006L - 3.0.0 3.1.1 diff --git a/aws-modules/aws-s3/pom.xml b/aws-modules/aws-s3/pom.xml index e7e04782b1..0ea99588d8 100644 --- a/aws-modules/aws-s3/pom.xml +++ b/aws-modules/aws-s3/pom.xml @@ -60,10 +60,8 @@ - 1.11.290 1.10.L001 0.9.4.0006L - 3.0.0 \ No newline at end of file diff --git a/aws-modules/pom.xml b/aws-modules/pom.xml index 3c5459d46c..601b1350bc 100644 --- a/aws-modules/pom.xml +++ b/aws-modules/pom.xml @@ -21,4 +21,8 @@ aws-s3 + + 1.11.290 + 3.0.0 + \ No newline at end of file diff --git a/core-java-modules/core-java-io-4/pom.xml b/core-java-modules/core-java-io-4/pom.xml index 9fc00ff586..2cc05698fc 100644 --- a/core-java-modules/core-java-io-4/pom.xml +++ b/core-java-modules/core-java-io-4/pom.xml @@ -32,6 +32,16 @@ log4j-over-slf4j ${org.slf4j.version} + + commons-codec + commons-codec + 1.15 + + + com.google.guava + guava + 31.1-jre + \ No newline at end of file diff --git a/core-java-modules/core-java-io-4/src/main/java/com/baeldung/md5checksum/Md5ChecksumGenerator.java b/core-java-modules/core-java-io-4/src/main/java/com/baeldung/md5checksum/Md5ChecksumGenerator.java new file mode 100644 index 0000000000..11c83591eb --- /dev/null +++ b/core-java-modules/core-java-io-4/src/main/java/com/baeldung/md5checksum/Md5ChecksumGenerator.java @@ -0,0 +1,44 @@ +package com.baeldung.md5checksum; + +import com.google.common.hash.HashCode; +import com.google.common.hash.Hashing; +import com.google.common.io.ByteSource; +import org.apache.commons.codec.digest.DigestUtils; + +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.math.BigInteger; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + +public class Md5ChecksumGenerator { + + public static String genWithApacheCommons(String filePath) throws IOException { + try (InputStream is = Files.newInputStream(Paths.get(filePath))) { + return DigestUtils.md5Hex(is); + } + } + + public static String genWithGuava(String filePath) throws IOException { + File file = new File(filePath); + ByteSource byteSource = com.google.common.io.Files.asByteSource(file); + HashCode hc = byteSource.hash(Hashing.md5()); + return hc.toString(); + } + + public static String genWithMessageDigest(String filePath) throws IOException, NoSuchAlgorithmException { + byte[] data = Files.readAllBytes(Paths.get(filePath)); + byte[] hash = MessageDigest.getInstance("MD5").digest(data); + return new BigInteger(1, hash).toString(16); + } + + public static void main(String[] args) throws IOException, NoSuchAlgorithmException { + String filePath = "D:\\temp.txt"; + System.out.println(genWithApacheCommons(filePath)); + System.out.println(genWithMessageDigest(filePath)); + System.out.println(genWithGuava(filePath)); + } +} diff --git a/core-java-modules/core-java-io-apis/src/test/java/com/baeldung/file/FileClassUnitTest.java b/core-java-modules/core-java-io-apis/src/test/java/com/baeldung/file/FileClassManualTest.java similarity index 98% rename from core-java-modules/core-java-io-apis/src/test/java/com/baeldung/file/FileClassUnitTest.java rename to core-java-modules/core-java-io-apis/src/test/java/com/baeldung/file/FileClassManualTest.java index 1883f40681..c5374f240e 100644 --- a/core-java-modules/core-java-io-apis/src/test/java/com/baeldung/file/FileClassUnitTest.java +++ b/core-java-modules/core-java-io-apis/src/test/java/com/baeldung/file/FileClassManualTest.java @@ -9,7 +9,10 @@ import java.util.List; import static org.junit.Assert.*; -public class FileClassUnitTest { +/** + * Manual tests for data reading and writing + */ +public class FileClassManualTest { @Test public void givenDir_whenMkdir_thenDirIsDeleted() { diff --git a/core-java-modules/core-java-numbers-5/src/main/java/com/baeldung/factors/FactorsOfInteger.java b/core-java-modules/core-java-numbers-5/src/main/java/com/baeldung/factors/FactorsOfInteger.java new file mode 100644 index 0000000000..a623a7b81e --- /dev/null +++ b/core-java-modules/core-java-numbers-5/src/main/java/com/baeldung/factors/FactorsOfInteger.java @@ -0,0 +1,39 @@ +package com.baeldung.factors; + +import java.util.HashSet; +import java.util.Set; + +public class FactorsOfInteger { + public static Set getAllFactorsVer1(int n) { + Set factors = new HashSet<>(); + for (int i = 1; i <= n; i++) { + if (n % i == 0) { + factors.add(i); + } + } + return factors; + } + + public static Set getAllFactorsVer2(int n) { + Set factors = new HashSet<>(); + for (int i = 1; i <= Math.sqrt(n); i++) { + if (n % i == 0) { + factors.add(i); + factors.add(n / i); + } + } + return factors; + } + + public static Set getAllFactorsVer3(int n) { + Set factors = new HashSet<>(); + int step = n % 2 == 0 ? 1 : 2; + for (int i = 1; i <= Math.sqrt(n); i += step) { + if (n % i == 0) { + factors.add(i); + factors.add(n / i); + } + } + return factors; + } +} diff --git a/core-java-modules/core-java-numbers-5/src/test/java/com/baeldung/factors/FactorsOfIntegerUnitTest.java b/core-java-modules/core-java-numbers-5/src/test/java/com/baeldung/factors/FactorsOfIntegerUnitTest.java new file mode 100644 index 0000000000..8a4105ed5a --- /dev/null +++ b/core-java-modules/core-java-numbers-5/src/test/java/com/baeldung/factors/FactorsOfIntegerUnitTest.java @@ -0,0 +1,40 @@ +package com.baeldung.factors; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.Map; +import java.util.Set; + +import org.junit.jupiter.api.Test; + +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; + +class FactorsOfIntegerUnitTest { + //@formatter:off + private final static Map> FACTOR_MAP = ImmutableMap.of( + 0, ImmutableSet.of(), + 1, ImmutableSet.of(1), + 20, ImmutableSet.of(1, 2, 4, 5, 10, 20), + 24, ImmutableSet.of(1, 2, 3, 4, 6, 8, 12, 24), + 97, ImmutableSet.of(1, 97), + 99, ImmutableSet.of(1, 3, 9, 11, 33, 99), + 100, ImmutableSet.of(1, 2, 4, 5, 10, 20, 25, 50, 100) + ); + //@formatter:on + + @Test + void givenAnInteger_whenCallingFindAllFactorsTheDraftVersion_shouldGetExpectedResult() { + FACTOR_MAP.forEach((number, expected) -> assertEquals(expected, FactorsOfInteger.getAllFactorsVer1(number))); + } + + @Test + void givenAnInteger_whenCallingFindAllFactorsVer2_shouldGetExpectedResult() { + FACTOR_MAP.forEach((number, expected) -> assertEquals(expected, FactorsOfInteger.getAllFactorsVer2(number))); + } + + @Test + void givenAnInteger_whenCallingFindAllFactorsVer3_shouldGetExpectedResult() { + FACTOR_MAP.forEach((number, expected) -> assertEquals(expected, FactorsOfInteger.getAllFactorsVer3(number))); + } +} diff --git a/core-java-modules/core-java-numbers-5/src/test/java/com/baeldung/intdivision/IntegerDivisionUnitTest.java b/core-java-modules/core-java-numbers-5/src/test/java/com/baeldung/intdivision/IntegerDivisionUnitTest.java new file mode 100644 index 0000000000..46527575e9 --- /dev/null +++ b/core-java-modules/core-java-numbers-5/src/test/java/com/baeldung/intdivision/IntegerDivisionUnitTest.java @@ -0,0 +1,26 @@ +package com.baeldung.intdivision; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class IntegerDivisionUnitTest { + @Test + void givenTwoInt_whenExecDivision_shouldGetInteger() { + int i = 10 / 4; + assertEquals(2, i); + + float x = 10 / 4; + assertEquals(2, x); + } + + @Test + void givenTwoInt_whenCastAnyoneToFloat_shouldGetFloatResult() { + float x = (float) 10 / 4; + assertEquals(2.5, x); + + float y = 10 / (float) 8; + assertEquals(1.25, y); + } + +} diff --git a/core-java-modules/core-java-string-apis/src/test/java/com/baeldung/removelastcharfromsb/RemoveLastCharFromSbUnitTest.java b/core-java-modules/core-java-string-apis/src/test/java/com/baeldung/removelastcharfromsb/RemoveLastCharFromSbUnitTest.java new file mode 100644 index 0000000000..8c1a4306ea --- /dev/null +++ b/core-java-modules/core-java-string-apis/src/test/java/com/baeldung/removelastcharfromsb/RemoveLastCharFromSbUnitTest.java @@ -0,0 +1,30 @@ +package com.baeldung.removelastcharfromsb; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import org.junit.jupiter.api.Test; + +class RemoveLastCharFromSbUnitTest { + @Test + void givenSb_whenRemovingUsingDeleteCharAt_shouldGetExpectedResult() { + StringBuilder sb = new StringBuilder("Using the sb.deleteCharAt() method!"); + sb.deleteCharAt(sb.length() - 1); + assertEquals("Using the sb.deleteCharAt() method", sb.toString()); + } + + @Test + void givenSb_whenRemovingUsingReplace_shouldGetExpectedResult() { + StringBuilder sb = new StringBuilder("Using the sb.replace() method!"); + int last = sb.length() - 1; + sb.replace(last, last + 1, ""); + assertEquals("Using the sb.replace() method", sb.toString()); + } + + @Test + void givenSb_whenRemovingUsingSubString_shouldGetExpectedResult() { + StringBuilder sb = new StringBuilder("Using the sb.substring() method!"); + assertEquals("Using the sb.substring() method", sb.substring(0, sb.length() - 1)); + //the stringBuilder object is not changed + assertEquals("Using the sb.substring() method!", sb.toString()); + } +} diff --git a/core-java-modules/core-java-string-operations-5/README.md b/core-java-modules/core-java-string-operations-5/README.md new file mode 100644 index 0000000000..a96ddccabb --- /dev/null +++ b/core-java-modules/core-java-string-operations-5/README.md @@ -0,0 +1,2 @@ +### Relevant Articles: + diff --git a/core-java-modules/core-java-string-operations-5/pom.xml b/core-java-modules/core-java-string-operations-5/pom.xml new file mode 100644 index 0000000000..a0c630cb0f --- /dev/null +++ b/core-java-modules/core-java-string-operations-5/pom.xml @@ -0,0 +1,35 @@ + + + 4.0.0 + core-java-string-operations-5 + 0.1.0-SNAPSHOT + core-java-string-operations-5 + jar + + + com.baeldung.core-java-modules + core-java-modules + 0.0.1-SNAPSHOT + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + ${maven.compiler.source} + ${maven.compiler.target} + + + + + + + 11 + 11 + + + \ No newline at end of file diff --git a/core-java-modules/core-java-string-operations-5/src/test/java/com/baeldung/charcomparison/CharComparisonUnitTest.java b/core-java-modules/core-java-string-operations-5/src/test/java/com/baeldung/charcomparison/CharComparisonUnitTest.java new file mode 100644 index 0000000000..e0f5bffbea --- /dev/null +++ b/core-java-modules/core-java-string-operations-5/src/test/java/com/baeldung/charcomparison/CharComparisonUnitTest.java @@ -0,0 +1,55 @@ +package com.baeldung.charcomparison; + +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; + +import java.util.Objects; + +import org.junit.jupiter.api.Test; + +class CharComparisonUnitTest { + + @Test + void givenTwoPrimitiveChars_whenUsingRelationalOperators_thenCompare() { + assertFalse('a' == 'A'); + assertTrue('a' < 'v'); + assertTrue('F' > 'D'); + } + + @Test + void givenTwoPrimitiveChars_whenUsingCompareMethod_thenCompare() { + assertTrue(Character.compare('C', 'C') == 0); + assertTrue(Character.compare('f', 'A') > 0); + assertTrue(Character.compare('Y', 'z') < 0); + } + + @Test + void givenTwoCharObjects_whenUsingCompareToMethod_thenCompare() { + Character chK = Character.valueOf('K'); + Character chG = Character.valueOf('G'); + Character chH = Character.valueOf('H'); + + assertTrue(chK.compareTo(chK) == 0); + assertTrue(chK.compareTo(chG) > 0); + assertTrue(chG.compareTo(chH) < 0); + } + + @Test + void givenTwoCharObjects_whenUsingEqualsMethod_thenCompare() { + Character chL = 'L'; + Character chV = 'V'; + + assertTrue(chL.equals(chL)); + assertFalse(chL.equals(chV)); + } + + @Test + void givenTwoCharObjects_whenUsingObjectsEqualsMethod_thenCompare() { + Character chA = 'A'; + Character chB = 'B'; + + assertTrue(Objects.equals(chA, chA)); + assertFalse(Objects.equals(chA, chB)); + } + +} diff --git a/docker-modules/docker-compose/rebuild-container/docker-compose-independents.yml b/docker-modules/docker-compose/rebuild-container/docker-compose-independents.yml new file mode 100644 index 0000000000..edf0934bc9 --- /dev/null +++ b/docker-modules/docker-compose/rebuild-container/docker-compose-independents.yml @@ -0,0 +1,8 @@ +version: "3.9" +services: + ubuntu: + image: "ubuntu:latest" + tty: true + alpine: + image: "alpine:latest" + tty: true \ No newline at end of file diff --git a/docker-modules/docker-compose/rebuild-container/docker-compose-with-dependency.yml b/docker-modules/docker-compose/rebuild-container/docker-compose-with-dependency.yml new file mode 100644 index 0000000000..49852dbd78 --- /dev/null +++ b/docker-modules/docker-compose/rebuild-container/docker-compose-with-dependency.yml @@ -0,0 +1,10 @@ +version: "3.9" +services: + ubuntu: + image: "ubuntu:latest" + tty: true + depends_on: + - "alpine" + alpine: + image: "alpine:latest" + tty: true \ No newline at end of file diff --git a/patterns/solid/src/main/java/com/baeldung/s/BadBook.java b/patterns/solid/src/main/java/com/baeldung/s/BadBook.java index 03c8fcd488..2712314db1 100644 --- a/patterns/solid/src/main/java/com/baeldung/s/BadBook.java +++ b/patterns/solid/src/main/java/com/baeldung/s/BadBook.java @@ -10,8 +10,8 @@ public class BadBook { //methods that directly relate to the book properties - public String replaceWordInText(String word){ - return text.replaceAll(word, text); + public String replaceWordInText(String word, String replacementWord){ + return text.replaceAll(word, replacementWord); } public boolean isWordInText(String word){ diff --git a/patterns/solid/src/main/java/com/baeldung/s/GoodBook.java b/patterns/solid/src/main/java/com/baeldung/s/GoodBook.java index b0993aca2b..04606bcdcd 100644 --- a/patterns/solid/src/main/java/com/baeldung/s/GoodBook.java +++ b/patterns/solid/src/main/java/com/baeldung/s/GoodBook.java @@ -9,8 +9,8 @@ public class GoodBook { //constructor, getters and setters //methods that directly relate to the book properties - public String replaceWordInText(String word){ - return text.replaceAll(word, text); + public String replaceWordInText(String word, String replacementWord){ + return text.replaceAll(word, replacementWord); } public boolean isWordInText(String word){ diff --git a/pom.xml b/pom.xml index 8f4ac4d8de..0fb651ed34 100644 --- a/pom.xml +++ b/pom.xml @@ -617,6 +617,7 @@ static-analysis stripe + struts tensorflow-java testing-modules @@ -1008,6 +1009,7 @@ static-analysis stripe + struts tensorflow-java testing-modules @@ -1302,8 +1304,8 @@ 1.8 1.2.17 2.5.0.0 - 1.33 - 1.33 + 1.35 + 1.35 2.21.0 4.4 2.11.0 diff --git a/spring-cloud-modules/pom.xml b/spring-cloud-modules/pom.xml index 43ccfd5501..0d18284662 100644 --- a/spring-cloud-modules/pom.xml +++ b/spring-cloud-modules/pom.xml @@ -52,6 +52,7 @@ spring-cloud-bus spring-cloud-data-flow spring-cloud-sleuth + spring-cloud-openfeign-2 diff --git a/spring-cloud-modules/spring-cloud-bus/pom.xml b/spring-cloud-modules/spring-cloud-bus/pom.xml index 4be1a60062..514060a400 100644 --- a/spring-cloud-modules/spring-cloud-bus/pom.xml +++ b/spring-cloud-modules/spring-cloud-bus/pom.xml @@ -16,8 +16,8 @@ - spring-cloud-config-client - spring-cloud-config-server + spring-cloud-bus-client + spring-cloud-bus-server diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/pom.xml b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/pom.xml similarity index 94% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/pom.xml rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/pom.xml index 87889570a3..0c6212c877 100644 --- a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/pom.xml +++ b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - spring-cloud-config-client - spring-cloud-config-client + spring-cloud-bus-client + spring-cloud-bus-client jar Demo Spring Cloud Config Client diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/main/java/com/baeldung/SpringCloudConfigClientApplication.java b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/main/java/com/baeldung/SpringCloudConfigClientApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/main/java/com/baeldung/SpringCloudConfigClientApplication.java rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/main/java/com/baeldung/SpringCloudConfigClientApplication.java diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/test/java/com/baeldung/SpringContextLiveTest.java b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/test/java/com/baeldung/SpringContextLiveTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-client/src/test/java/com/baeldung/SpringContextLiveTest.java rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-client/src/test/java/com/baeldung/SpringContextLiveTest.java diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/pom.xml b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/pom.xml similarity index 94% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/pom.xml rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/pom.xml index e6439fa56a..18c758a2e1 100644 --- a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/pom.xml +++ b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - spring-cloud-config-server - spring-cloud-config-server + spring-cloud-bus-server + spring-cloud-bus-server jar Demo Spring Cloud Config Server diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/java/com/baeldung/SpringCloudConfigServerApplication.java b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/java/com/baeldung/SpringCloudConfigServerApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/java/com/baeldung/SpringCloudConfigServerApplication.java rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/java/com/baeldung/SpringCloudConfigServerApplication.java diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/resources/application.properties rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/resources/config-server.jks b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/resources/config-server.jks similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/resources/config-server.jks rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/resources/config-server.jks diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/test/java/com/baeldung/SpringCloudConfigServerApplicationIntegrationTest.java b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/test/java/com/baeldung/SpringCloudConfigServerApplicationIntegrationTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/test/java/com/baeldung/SpringCloudConfigServerApplicationIntegrationTest.java rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/test/java/com/baeldung/SpringCloudConfigServerApplicationIntegrationTest.java diff --git a/spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/test/java/com/baeldung/SpringContextTest.java b/spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-bus/spring-cloud-config-server/src/test/java/com/baeldung/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-bus/spring-cloud-bus-server/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-config/pom.xml b/spring-cloud-modules/spring-cloud-config/pom.xml index fc9a989844..965f65f61b 100644 --- a/spring-cloud-modules/spring-cloud-config/pom.xml +++ b/spring-cloud-modules/spring-cloud-config/pom.xml @@ -16,8 +16,8 @@ - server - client + spring-cloud-config-server + spring-cloud-config-client diff --git a/spring-cloud-modules/spring-cloud-config/client/pom.xml b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/pom.xml similarity index 92% rename from spring-cloud-modules/spring-cloud-config/client/pom.xml rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/pom.xml index 0f463b6d6d..5b7ff9640d 100644 --- a/spring-cloud-modules/spring-cloud-config/client/pom.xml +++ b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/pom.xml @@ -3,8 +3,8 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - client - client + spring-cloud-config-client + spring-cloud-config-client com.baeldung.spring.cloud diff --git a/spring-cloud-modules/spring-cloud-config/client/src/main/java/com/baeldung/spring/cloud/config/client/ConfigClient.java b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/src/main/java/com/baeldung/spring/cloud/config/client/ConfigClient.java similarity index 100% rename from spring-cloud-modules/spring-cloud-config/client/src/main/java/com/baeldung/spring/cloud/config/client/ConfigClient.java rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/src/main/java/com/baeldung/spring/cloud/config/client/ConfigClient.java diff --git a/spring-cloud-modules/spring-cloud-config/client/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/src/main/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-config/client/src/main/resources/application.properties rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/src/main/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-config/client/src/test/java/com/baeldung/spring/cloud/config/client/SpringContextLiveTest.java b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/src/test/java/com/baeldung/spring/cloud/config/client/SpringContextLiveTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-config/client/src/test/java/com/baeldung/spring/cloud/config/client/SpringContextLiveTest.java rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-client/src/test/java/com/baeldung/spring/cloud/config/client/SpringContextLiveTest.java diff --git a/spring-cloud-modules/spring-cloud-config/config-repo/config-client-development.properties b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-repo/config-client-development.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-config/config-repo/config-client-development.properties rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-repo/config-client-development.properties diff --git a/spring-cloud-modules/spring-cloud-config/config-repo/config-client-production.properties b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-repo/config-client-production.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-config/config-repo/config-client-production.properties rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-repo/config-client-production.properties diff --git a/spring-cloud-modules/spring-cloud-config/server/pom.xml b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/pom.xml similarity index 93% rename from spring-cloud-modules/spring-cloud-config/server/pom.xml rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/pom.xml index b41277113f..8920744a45 100644 --- a/spring-cloud-modules/spring-cloud-config/server/pom.xml +++ b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/pom.xml @@ -3,8 +3,8 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - server - server + spring-cloud-config-server + spring-cloud-config-server com.baeldung.spring.cloud diff --git a/spring-cloud-modules/spring-cloud-config/server/src/main/java/com/baeldung/spring/cloud/config/server/ConfigServer.java b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/java/com/baeldung/spring/cloud/config/server/ConfigServer.java similarity index 100% rename from spring-cloud-modules/spring-cloud-config/server/src/main/java/com/baeldung/spring/cloud/config/server/ConfigServer.java rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/java/com/baeldung/spring/cloud/config/server/ConfigServer.java diff --git a/spring-cloud-modules/spring-cloud-config/server/src/main/java/com/baeldung/spring/cloud/config/server/SecurityConfiguration.java b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/java/com/baeldung/spring/cloud/config/server/SecurityConfiguration.java similarity index 100% rename from spring-cloud-modules/spring-cloud-config/server/src/main/java/com/baeldung/spring/cloud/config/server/SecurityConfiguration.java rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/java/com/baeldung/spring/cloud/config/server/SecurityConfiguration.java diff --git a/spring-cloud-modules/spring-cloud-config/server/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-config/server/src/main/resources/application.properties rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-config/server/src/main/resources/config-server.jks b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/resources/config-server.jks similarity index 100% rename from spring-cloud-modules/spring-cloud-config/server/src/main/resources/config-server.jks rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/main/resources/config-server.jks diff --git a/spring-cloud-modules/spring-cloud-config/server/src/test/java/com/baeldung/spring/cloud/config/server/SpringContextTest.java b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/test/java/com/baeldung/spring/cloud/config/server/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-config/server/src/test/java/com/baeldung/spring/cloud/config/server/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/test/java/com/baeldung/spring/cloud/config/server/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-config/server/src/test/resources/application.properties b/spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/test/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-config/server/src/test/resources/application.properties rename to spring-cloud-modules/spring-cloud-config/spring-cloud-config-server/src/test/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-data-flow/pom.xml b/spring-cloud-modules/spring-cloud-data-flow/pom.xml index 25a70642ec..a9d9a22a84 100644 --- a/spring-cloud-modules/spring-cloud-data-flow/pom.xml +++ b/spring-cloud-modules/spring-cloud-data-flow/pom.xml @@ -17,8 +17,8 @@ spring-cloud-data-flow-stream-processing spring-cloud-data-flow-etl - batch-job - apache-spark-job + spring-cloud-data-flow-batch-job + spring-cloud-data-flow-apache-spark-job \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/README.md b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/README.md similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/README.md rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/README.md diff --git a/spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/pom.xml b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/pom.xml similarity index 90% rename from spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/pom.xml rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/pom.xml index b2b0c7d68a..b619cb43d0 100644 --- a/spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/pom.xml +++ b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - apache-spark-job - apache-spark-job + spring-cloud-data-flow-apache-spark-job + spring-cloud-data-flow-apache-spark-job com.baeldung.spring.cloud diff --git a/spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/src/main/java/com/baeldung/spring/cloud/PiApproximation.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/src/main/java/com/baeldung/spring/cloud/PiApproximation.java similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/apache-spark-job/src/main/java/com/baeldung/spring/cloud/PiApproximation.java rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-apache-spark-job/src/main/java/com/baeldung/spring/cloud/PiApproximation.java diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/README.md b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/README.md similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/README.md rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/README.md diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/pom.xml b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/pom.xml similarity index 93% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/pom.xml rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/pom.xml index 627724a6be..1c877da946 100644 --- a/spring-cloud-modules/spring-cloud-data-flow/batch-job/pom.xml +++ b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/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 com.baeldung.spring.cloud - batch-job + spring-cloud-data-flow-batch-job 0.0.1-SNAPSHOT - batch-job + spring-cloud-data-flow-batch-job jar Demo project for Spring Boot diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/src/main/java/com/baeldung/spring/cloud/BatchJobApplication.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/main/java/com/baeldung/spring/cloud/BatchJobApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/src/main/java/com/baeldung/spring/cloud/BatchJobApplication.java rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/main/java/com/baeldung/spring/cloud/BatchJobApplication.java diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/src/main/java/com/baeldung/spring/cloud/JobConfiguration.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/main/java/com/baeldung/spring/cloud/JobConfiguration.java similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/src/main/java/com/baeldung/spring/cloud/JobConfiguration.java rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/main/java/com/baeldung/spring/cloud/JobConfiguration.java diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/src/test/java/com/baeldung/SpringContextTest.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/src/test/java/com/baeldung/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-data-flow/batch-job/src/test/java/com/baeldung/spring/cloud/BatchJobApplicationIntegrationTest.java b/spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/test/java/com/baeldung/spring/cloud/BatchJobApplicationIntegrationTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-data-flow/batch-job/src/test/java/com/baeldung/spring/cloud/BatchJobApplicationIntegrationTest.java rename to spring-cloud-modules/spring-cloud-data-flow/spring-cloud-data-flow-batch-job/src/test/java/com/baeldung/spring/cloud/BatchJobApplicationIntegrationTest.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/pom.xml b/spring-cloud-modules/spring-cloud-hystrix/pom.xml index 41548ba36a..804faf552f 100644 --- a/spring-cloud-modules/spring-cloud-hystrix/pom.xml +++ b/spring-cloud-modules/spring-cloud-hystrix/pom.xml @@ -15,9 +15,9 @@ - feign-rest-consumer - rest-producer - rest-consumer + spring-cloud-hystrix-feign-rest-consumer + spring-cloud-hystrix-rest-producer + spring-cloud-hystrix-rest-consumer \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/pom.xml b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/pom.xml similarity index 95% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/pom.xml rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/pom.xml index b57ef7f7d3..ec9bffea98 100644 --- a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/pom.xml +++ b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/pom.xml @@ -3,9 +3,9 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - feign-rest-consumer + spring-cloud-hystrix-feign-rest-consumer 1.0.0-SNAPSHOT - feign-rest-consumer + spring-cloud-hystrix-feign-rest-consumer jar diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingClient.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingClient.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingClient.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingClient.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerFeignApplication.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerFeignApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerFeignApplication.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerFeignApplication.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/resources/application.properties rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/resources/templates/greeting-view.html b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/resources/templates/greeting-view.html similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/main/resources/templates/greeting-view.html rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/main/resources/templates/greeting-view.html diff --git a/spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/feign-rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-feign-rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/pom.xml b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml similarity index 95% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/pom.xml rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml index 741457529c..3c9d6cdf59 100644 --- a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/pom.xml +++ b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/pom.xml @@ -3,9 +3,9 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - rest-consumer + spring-cloud-hystrix-rest-consumer 1.0.0-SNAPSHOT - rest-consumer + spring-cloud-hystrix-rest-consumer jar diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingController.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingService.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingService.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingService.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/GreetingService.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/consumer/RestConsumerApplication.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/resources/application.properties rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/resources/templates/greeting-view.html b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/resources/templates/greeting-view.html similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/main/resources/templates/greeting-view.html rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/main/resources/templates/greeting-view.html diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-consumer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/consumer/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/pom.xml b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/pom.xml similarity index 90% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/pom.xml rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/pom.xml index 8c72b34f87..cd9b8ab0ca 100644 --- a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/pom.xml +++ b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/pom.xml @@ -3,9 +3,9 @@ xmlns="http://maven.apache.org/POM/4.0.0" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - rest-producer + spring-cloud-hystrix-rest-producer 1.0.0-SNAPSHOT - rest-producer + spring-cloud-hystrix-rest-producer jar diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingController.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingController.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingController.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingController.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingControllerImpl.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingControllerImpl.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingControllerImpl.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/GreetingControllerImpl.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/RestProducerApplication.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/RestProducerApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/RestProducerApplication.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/java/com/baeldung/spring/cloud/hystrix/rest/producer/RestProducerApplication.java diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/resources/application.properties similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/resources/application.properties rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/resources/application.properties diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/producer/SpringContextTest.java b/spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/producer/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-hystrix/rest-producer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/producer/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-hystrix/spring-cloud-hystrix-rest-producer/src/test/java/com/baeldung/spring/cloud/hystrix/rest/producer/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/pom.xml b/spring-cloud-modules/spring-cloud-netflix-sidecar/pom.xml index 3a72496279..919be24a35 100644 --- a/spring-cloud-modules/spring-cloud-netflix-sidecar/pom.xml +++ b/spring-cloud-modules/spring-cloud-netflix-sidecar/pom.xml @@ -17,8 +17,8 @@ - sidecar-demo - echo-demo + spring-cloud-netflix-sidecar-demo + spring-cloud-netflix-sidecar-echo-demo diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/nodejs/hello.js b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/nodejs/hello.js similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/nodejs/hello.js rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/nodejs/hello.js diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/pom.xml b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/pom.xml similarity index 94% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/pom.xml rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/pom.xml index 200897652f..f8552aba93 100644 --- a/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/pom.xml +++ b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - sidecar-demo - sidecar-demo + spring-cloud-netflix-sidecar-demo + spring-cloud-netflix-sidecar-demo Sidecar demo for hello endpoint diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/src/main/java/com/baeldung/cloud/sidecar/SidecarApplication.java b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/src/main/java/com/baeldung/cloud/sidecar/SidecarApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/src/main/java/com/baeldung/cloud/sidecar/SidecarApplication.java rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/src/main/java/com/baeldung/cloud/sidecar/SidecarApplication.java diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/src/test/java/com/baeldung/cloud/sidecar/SpringContextTest.java b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/src/test/java/com/baeldung/cloud/sidecar/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/sidecar-demo/src/test/java/com/baeldung/cloud/sidecar/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-demo/src/test/java/com/baeldung/cloud/sidecar/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/pom.xml b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/pom.xml similarity index 93% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/pom.xml rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/pom.xml index d8b1654eaa..8066235679 100644 --- a/spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/pom.xml +++ b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/pom.xml @@ -2,8 +2,8 @@ 4.0.0 - echo-demo - echo-demo + spring-cloud-netflix-sidecar-echo-demo + spring-cloud-netflix-sidecar-echo-demo Demo for echo endpoint com.baeldung.cloud diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/src/main/java/com/baeldung/cloud/echo/EchoApplication.java b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/src/main/java/com/baeldung/cloud/echo/EchoApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/src/main/java/com/baeldung/cloud/echo/EchoApplication.java rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/src/main/java/com/baeldung/cloud/echo/EchoApplication.java diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/src/test/java/com/baeldung/cloud/echo/SpringContextTest.java b/spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/src/test/java/com/baeldung/cloud/echo/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-netflix-sidecar/echo-demo/src/test/java/com/baeldung/cloud/echo/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-netflix-sidecar/spring-cloud-netflix-sidecar-echo-demo/src/test/java/com/baeldung/cloud/echo/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/README.md b/spring-cloud-modules/spring-cloud-openfeign-2/README.md new file mode 100644 index 0000000000..7d843af9ea --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/README.md @@ -0,0 +1 @@ +### Relevant Articles: diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/pom.xml b/spring-cloud-modules/spring-cloud-openfeign-2/pom.xml new file mode 100644 index 0000000000..7f7acc5fe8 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/pom.xml @@ -0,0 +1,64 @@ + + + 4.0.0 + com.baeldung.cloud + spring-cloud-openfeign-2 + spring-cloud-openfeign-2 + OpenFeign project for Spring Boot + + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../../parent-boot-2 + + + + + + org.springframework.cloud + spring-cloud-dependencies + ${spring-cloud.version} + pom + import + + + + + + + org.springframework.cloud + spring-cloud-starter-openfeign + + + io.github.openfeign + feign-okhttp + + + org.springframework.boot + spring-boot-starter-web + + + io.github.openfeign.form + feign-form + ${feign-form.version} + + + io.github.openfeign.form + feign-form-spring + + + org.springframework.boot + spring-boot-starter-test + test + + + + + 2021.0.0 + 3.8.0 + + + \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/ExampleApplication.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/ExampleApplication.java new file mode 100644 index 0000000000..c7f07f6667 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/ExampleApplication.java @@ -0,0 +1,16 @@ +package com.baeldung.cloud.openfeign; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; + +@SpringBootApplication +@EnableFeignClients +public class ExampleApplication { + + public static void main(String[] args) { + SpringApplication.run(ExampleApplication.class, args); + } + +} + diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/exception/BadRequestException.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/exception/BadRequestException.java new file mode 100644 index 0000000000..7c2daf43fe --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/exception/BadRequestException.java @@ -0,0 +1,21 @@ +package com.baeldung.cloud.openfeign.exception; + +public class BadRequestException extends Exception { + + public BadRequestException() { + } + + public BadRequestException(String message) { + super(message); + } + + public BadRequestException(Throwable cause) { + super(cause); + } + + @Override + public String toString() { + return "BadRequestException: " + getMessage(); + } + +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java new file mode 100644 index 0000000000..19f6204b86 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java @@ -0,0 +1,18 @@ +package com.baeldung.cloud.openfeign.exception; + +public class NotFoundException extends Exception { + + public NotFoundException(String message) { + super(message); + } + + public NotFoundException(Throwable cause) { + super(cause); + } + + @Override + public String toString() { + return "NotFoundException: " + getMessage(); + } + +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/ExceptionMessage.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/ExceptionMessage.java new file mode 100644 index 0000000000..45a555b2ea --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/ExceptionMessage.java @@ -0,0 +1,55 @@ +package com.baeldung.cloud.openfeign.fileupload.config; + +public class ExceptionMessage { + private String timestamp; + private int status; + private String error; + private String message; + private String path; + + public String getTimestamp() { + return timestamp; + } + + public void setTimestamp(String timestamp) { + this.timestamp = timestamp; + } + + public int getStatus() { + return status; + } + + public void setStatus(int status) { + this.status = status; + } + + public String getError() { + return error; + } + + public void setError(String error) { + this.error = error; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + @Override + public String toString() { + return "ExceptionMessage [timestamp=" + timestamp + ", status=" + status + ", error=" + error + ", message=" + message + ", path=" + path + "]"; + } + +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/FeignSupportConfig.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/FeignSupportConfig.java new file mode 100644 index 0000000000..802077a3d7 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/FeignSupportConfig.java @@ -0,0 +1,28 @@ +package com.baeldung.cloud.openfeign.fileupload.config; + +import org.springframework.beans.factory.ObjectFactory; +import org.springframework.boot.autoconfigure.http.HttpMessageConverters; +import org.springframework.cloud.openfeign.support.SpringEncoder; +import org.springframework.context.annotation.Bean; +import org.springframework.web.client.RestTemplate; + +import feign.codec.Encoder; +import feign.codec.ErrorDecoder; +import feign.form.spring.SpringFormEncoder; + +public class FeignSupportConfig { + @Bean + public Encoder multipartFormEncoder() { + return new SpringFormEncoder(new SpringEncoder(new ObjectFactory() { + @Override + public HttpMessageConverters getObject() { + return new HttpMessageConverters(new RestTemplate().getMessageConverters()); + } + })); + } + + @Bean + public ErrorDecoder errorDecoder() { + return new RetreiveMessageErrorDecoder(); + } +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/RetreiveMessageErrorDecoder.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/RetreiveMessageErrorDecoder.java new file mode 100644 index 0000000000..5ebd7b6887 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/config/RetreiveMessageErrorDecoder.java @@ -0,0 +1,34 @@ +package com.baeldung.cloud.openfeign.fileupload.config; + +import java.io.IOException; +import java.io.InputStream; + +import com.baeldung.cloud.openfeign.exception.BadRequestException; +import com.baeldung.cloud.openfeign.exception.NotFoundException; +import com.fasterxml.jackson.databind.ObjectMapper; + +import feign.Response; +import feign.codec.ErrorDecoder; + +public class RetreiveMessageErrorDecoder implements ErrorDecoder { + private final ErrorDecoder errorDecoder = new Default(); + @Override + public Exception decode(String methodKey, Response response) { + ExceptionMessage message = null; + try (InputStream bodyIs = response.body() + .asInputStream()) { + ObjectMapper mapper = new ObjectMapper(); + message = mapper.readValue(bodyIs, ExceptionMessage.class); + } catch (IOException e) { + return new Exception(e.getMessage()); + } + switch (response.status()) { + case 400: + return new BadRequestException(message.getMessage() != null ? message.getMessage() : "Bad Request"); + case 404: + return new NotFoundException(message.getMessage() != null ? message.getMessage() : "Not found"); + default: + return errorDecoder.decode(methodKey, response); + } + } +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientFallbackFactory.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientFallbackFactory.java new file mode 100644 index 0000000000..105be15192 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientFallbackFactory.java @@ -0,0 +1,30 @@ +package com.baeldung.cloud.openfeign.fileupload.service; + +import org.springframework.cloud.openfeign.FallbackFactory; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import com.baeldung.cloud.openfeign.exception.BadRequestException; +import com.baeldung.cloud.openfeign.exception.NotFoundException; + +@Component +public class FileUploadClientFallbackFactory implements FallbackFactory { + @Override + public FileUploadClientWithFallbackFactory create(Throwable cause) { + return new FileUploadClientWithFallbackFactory() { + @Override + public String fileUpload(MultipartFile file) { + if (cause instanceof BadRequestException) { + return "Bad Request!!!"; + } + if (cause instanceof NotFoundException) { + return "Not Found!!!"; + } + if (cause instanceof Exception) { + return "Exception!!!"; + } + return "Successfully Uploaded file!!!"; + } + }; + } +} \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallBack.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallBack.java new file mode 100644 index 0000000000..e842770f2d --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallBack.java @@ -0,0 +1,15 @@ +package com.baeldung.cloud.openfeign.fileupload.service; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import com.baeldung.cloud.openfeign.fileupload.config.FeignSupportConfig; + +@FeignClient(name = "file", url = "http://localhost:8081", configuration = FeignSupportConfig.class, fallback = FileUploadClientWithFallbackImpl.class) +public interface FileUploadClientWithFallBack { + @PostMapping(value = "/upload-error", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + String fileUpload(@RequestPart(value = "file") MultipartFile file); +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallbackFactory.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallbackFactory.java new file mode 100644 index 0000000000..829cd0f535 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallbackFactory.java @@ -0,0 +1,15 @@ +package com.baeldung.cloud.openfeign.fileupload.service; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestPart; +import org.springframework.web.multipart.MultipartFile; + +import com.baeldung.cloud.openfeign.fileupload.config.FeignSupportConfig; + +@FeignClient(name = "file", url = "http://localhost:8081", configuration = FeignSupportConfig.class, fallbackFactory = FileUploadClientFallbackFactory.class) +public interface FileUploadClientWithFallbackFactory { + @PostMapping(value = "/upload-error", consumes = MediaType.MULTIPART_FORM_DATA_VALUE) + String fileUpload(@RequestPart(value = "file") MultipartFile file); +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallbackImpl.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallbackImpl.java new file mode 100644 index 0000000000..b41a7f3c5d --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/FileUploadClientWithFallbackImpl.java @@ -0,0 +1,31 @@ +package com.baeldung.cloud.openfeign.fileupload.service; + +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import com.baeldung.cloud.openfeign.exception.BadRequestException; +import com.baeldung.cloud.openfeign.exception.NotFoundException; + +@Component +public class FileUploadClientWithFallbackImpl implements FileUploadClientWithFallBack { + + @Override + public String fileUpload(MultipartFile file) { + try { + throw new NotFoundException("hi, something wrong"); + } catch (Exception ex) { + + if (ex instanceof BadRequestException) { + return "Bad Request!!!"; + } + if (ex instanceof NotFoundException) { + return "Not Found!!!"; + } + if (ex instanceof Exception) { + return "Exception!!!"; + } + return "Successfully Uploaded file!!!"; + } + } + +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadResource.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadResource.java new file mode 100644 index 0000000000..2d5090897d --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadResource.java @@ -0,0 +1,16 @@ +package com.baeldung.cloud.openfeign.fileupload.service; + +import org.springframework.web.multipart.MultipartFile; + +import feign.Headers; +import feign.Param; +import feign.RequestLine; +import feign.Response; + +public interface UploadResource { + + @RequestLine("POST /upload-error") + @Headers("Content-Type: multipart/form-data") + Response uploadFile(@Param("file") MultipartFile file); + +} \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java new file mode 100644 index 0000000000..244a5a2168 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java @@ -0,0 +1,34 @@ +package com.baeldung.cloud.openfeign.fileupload.service; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.web.multipart.MultipartFile; + +import feign.Feign; +import feign.Response; +import feign.form.spring.SpringFormEncoder; + +@Service +public class UploadService { + private static final String HTTP_FILE_UPLOAD_URL = "http://localhost:8081"; + + @Autowired + private FileUploadClientWithFallbackFactory fileUploadClient; + @Autowired + private FileUploadClientWithFallBack fileUploadClientWithFallback; + + public boolean uploadFileWithManualClient(MultipartFile file) { + UploadResource fileUploadResource = Feign.builder().encoder(new SpringFormEncoder()) + .target(UploadResource.class, HTTP_FILE_UPLOAD_URL); + Response response = fileUploadResource.uploadFile(file); + return response.status() == 200; + } + + public String uploadFileWithFallbackFactory(MultipartFile file) { + return fileUploadClient.fileUpload(file); + } + + public String uploadFileWithFallback(MultipartFile file) { + return fileUploadClientWithFallback.fileUpload(file); + } +} \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/resources/application.properties b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/resources/application.properties new file mode 100644 index 0000000000..7188b74c9b --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/resources/application.properties @@ -0,0 +1,10 @@ +server.port=8085 +spring.main.allow-bean-definition-overriding=true +spring.application.name= openfeign +logging.level.com.baeldung.cloud.openfeign.client: DEBUG +feign.hystrix.enabled=true + +spring.security.oauth2.client.registration.keycloak.authorization-grant-type=client_credentials +spring.security.oauth2.client.registration.keycloak.client-id=payment-app +spring.security.oauth2.client.registration.keycloak.client-secret=863e9de4-33d4-4471-b35e-f8d2434385bb +spring.security.oauth2.client.provider.keycloak.token-uri=http://localhost:8083/auth/realms/master/protocol/openid-connect/token diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/main/resources/fileupload.txt b/spring-cloud-modules/spring-cloud-openfeign-2/src/main/resources/fileupload.txt new file mode 100644 index 0000000000..e69de29bb2 diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/test/java/com/baeldung/cloud/openfeign/OpenFeignFileUploadLiveTest.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/test/java/com/baeldung/cloud/openfeign/OpenFeignFileUploadLiveTest.java new file mode 100644 index 0000000000..6396be2453 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/test/java/com/baeldung/cloud/openfeign/OpenFeignFileUploadLiveTest.java @@ -0,0 +1,61 @@ +package com.baeldung.cloud.openfeign; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; + +import org.apache.commons.io.IOUtils; +import org.junit.Assert; +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.mock.web.MockMultipartFile; +import org.springframework.test.context.junit4.SpringRunner; +import org.springframework.web.multipart.MultipartFile; + +import com.baeldung.cloud.openfeign.exception.NotFoundException; +import com.baeldung.cloud.openfeign.fileupload.service.UploadService; + +@RunWith(SpringRunner.class) +@SpringBootTest +public class OpenFeignFileUploadLiveTest { + + @Autowired + private UploadService uploadService; + + private static String FILE_NAME = "fileupload.txt"; + + @Test(expected = NotFoundException.class) + public void whenFileUploadClientFallbackFactory_thenFileUploadError() throws IOException { + ClassLoader classloader = Thread.currentThread().getContextClassLoader(); + File file = new File(classloader.getResource(FILE_NAME).getFile()); + Assert.assertTrue(file.exists()); + FileInputStream input = new FileInputStream(file); + MultipartFile multipartFile = new MockMultipartFile("file", file.getName(), "text/plain", + IOUtils.toByteArray(input)); + uploadService.uploadFileWithFallbackFactory(multipartFile); + } + + @Test(expected = NotFoundException.class) + public void whenFileUploadClientFallback_thenFileUploadError() throws IOException { + ClassLoader classloader = Thread.currentThread().getContextClassLoader(); + File file = new File(classloader.getResource(FILE_NAME).getFile()); + Assert.assertTrue(file.exists()); + FileInputStream input = new FileInputStream(file); + MultipartFile multipartFile = new MockMultipartFile("file", file.getName(), "text/plain", + IOUtils.toByteArray(input)); + uploadService.uploadFileWithFallback(multipartFile); + } + + @Test(expected = NotFoundException.class) + public void whenFileUploadWithMannualClient_thenFileUploadError() throws IOException { + ClassLoader classloader = Thread.currentThread().getContextClassLoader(); + File file = new File(classloader.getResource(FILE_NAME).getFile()); + Assert.assertTrue(file.exists()); + FileInputStream input = new FileInputStream(file); + MultipartFile multipartFile = new MockMultipartFile("file", file.getName(), "text/plain", + IOUtils.toByteArray(input)); + uploadService.uploadFileWithManualClient(multipartFile); + } +} diff --git a/spring-cloud-modules/spring-cloud-openfeign-2/src/test/java/com/baeldung/cloud/openfeign/SpringContextTest.java b/spring-cloud-modules/spring-cloud-openfeign-2/src/test/java/com/baeldung/cloud/openfeign/SpringContextTest.java new file mode 100644 index 0000000000..4bf35f74f4 --- /dev/null +++ b/spring-cloud-modules/spring-cloud-openfeign-2/src/test/java/com/baeldung/cloud/openfeign/SpringContextTest.java @@ -0,0 +1,16 @@ +package com.baeldung.cloud.openfeign; + + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +@RunWith(SpringRunner.class) +@SpringBootTest(classes = ExampleApplication.class) +public class SpringContextTest { + + @Test + public void whenSpringContextIsBootstrapped_thenNoExceptions() { + } +} diff --git a/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/CustomErrorDecoder.java b/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/CustomErrorDecoder.java index 4d32cf083f..303a5db526 100644 --- a/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/CustomErrorDecoder.java +++ b/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/config/CustomErrorDecoder.java @@ -13,7 +13,7 @@ public class CustomErrorDecoder implements ErrorDecoder { case 400: return new BadRequestException(); case 404: - return new NotFoundException(); + return new NotFoundException("Not found !!!"); default: return new Exception("Generic error"); } diff --git a/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java b/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java index 28d0e95e9a..19f6204b86 100644 --- a/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java +++ b/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/exception/NotFoundException.java @@ -2,9 +2,6 @@ package com.baeldung.cloud.openfeign.exception; public class NotFoundException extends Exception { - public NotFoundException() { - } - public NotFoundException(String message) { super(message); } @@ -15,7 +12,7 @@ public class NotFoundException extends Exception { @Override public String toString() { - return "NotFoundException: "+getMessage(); + return "NotFoundException: " + getMessage(); } } diff --git a/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java b/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java index 742a37668b..c0d1962a71 100644 --- a/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java +++ b/spring-cloud-modules/spring-cloud-openfeign/src/main/java/com/baeldung/cloud/openfeign/fileupload/service/UploadService.java @@ -14,7 +14,7 @@ public class UploadService { @Autowired private UploadClient client; - + public boolean uploadFileWithManualClient(MultipartFile file) { UploadResource fileUploadResource = Feign.builder().encoder(new SpringFormEncoder()) .target(UploadResource.class, HTTP_FILE_UPLOAD_URL); @@ -29,5 +29,4 @@ public class UploadService { public String uploadFileError(MultipartFile file) { return client.fileUpload(file); } - } \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-zookeeper/pom.xml b/spring-cloud-modules/spring-cloud-zookeeper/pom.xml index a3567adb06..7ada9f0cc9 100644 --- a/spring-cloud-modules/spring-cloud-zookeeper/pom.xml +++ b/spring-cloud-modules/spring-cloud-zookeeper/pom.xml @@ -14,8 +14,8 @@ - Greeting - HelloWorld + spring-cloud-zookeeper-greeting + spring-cloud-zookeeper-helloworld \ No newline at end of file diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/pom.xml b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/pom.xml similarity index 96% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/pom.xml rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/pom.xml index 8248884632..b6f711f72d 100644 --- a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/pom.xml +++ b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - Greeting - Greeting + spring-cloud-zookeeper-greeting + spring-cloud-zookeeper-greeting jar diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingApplication.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingApplication.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingApplication.java diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingController.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingController.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingController.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/java/com/baeldung/spring/cloud/greeting/GreetingController.java diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/HelloWorldClient.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/java/com/baeldung/spring/cloud/greeting/HelloWorldClient.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/java/com/baeldung/spring/cloud/greeting/HelloWorldClient.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/java/com/baeldung/spring/cloud/greeting/HelloWorldClient.java diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/resources/templates/greeting-view.html b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/resources/templates/greeting-view.html similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/main/resources/templates/greeting-view.html rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/main/resources/templates/greeting-view.html diff --git a/spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/test/java/com/baeldung/SpringContextTest.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/Greeting/src/test/java/com/baeldung/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-greeting/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/pom.xml b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/pom.xml similarity index 95% rename from spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/pom.xml rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/pom.xml index 57a1cc029c..e9baf2b174 100644 --- a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/pom.xml +++ b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - HelloWorld - HelloWorld + spring-cloud-zookeeper-helloworld + spring-cloud-zookeeper-helloworld jar diff --git a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldApplication.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldApplication.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldApplication.java diff --git a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldController.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldController.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldController.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/java/com/baeldung/spring/cloud/helloworld/HelloWorldController.java diff --git a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/resources/logback.xml b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/main/resources/logback.xml rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/main/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/test/java/com/baeldung/spring/cloud/helloworld/SpringContextTest.java b/spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/test/java/com/baeldung/spring/cloud/helloworld/SpringContextTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zookeeper/HelloWorld/src/test/java/com/baeldung/spring/cloud/helloworld/SpringContextTest.java rename to spring-cloud-modules/spring-cloud-zookeeper/spring-cloud-zookeeper-helloworld/src/test/java/com/baeldung/spring/cloud/helloworld/SpringContextTest.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/pom.xml b/spring-cloud-modules/spring-cloud-zuul-fallback/pom.xml index 7cddec48fe..0cd13735f2 100644 --- a/spring-cloud-modules/spring-cloud-zuul-fallback/pom.xml +++ b/spring-cloud-modules/spring-cloud-zuul-fallback/pom.xml @@ -15,8 +15,8 @@ - api-gateway - weather-service + spring-cloud-zuul-fallback-api-gateway + spring-cloud-zuul-fallback-weather-service diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/pom.xml b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/pom.xml similarity index 93% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/pom.xml rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/pom.xml index 13bfabeb3b..bdc3d0c2bc 100644 --- a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/pom.xml +++ b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - api-gateway - api-gateway + spring-cloud-zuul-fallback-api-gateway + spring-cloud-zuul-fallback-api-gateway jar API Gateway using Zuul diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplication.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplication.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplication.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayClientResponse.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayClientResponse.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayClientResponse.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayClientResponse.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallback.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallback.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallback.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallback.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallback.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallback.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallback.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallback.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplicationIntegrationTest.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplicationIntegrationTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplicationIntegrationTest.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/ApiGatewayApplicationIntegrationTest.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallbackUnitTest.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallbackUnitTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallbackUnitTest.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/GatewayServiceFallbackUnitTest.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallbackUnitTest.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallbackUnitTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallbackUnitTest.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/java/com/baeldung/spring/cloud/apigateway/fallback/WeatherServiceFallbackUnitTest.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/resources/logback.xml b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/resources/logback.xml similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/api-gateway/src/test/resources/logback.xml rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-api-gateway/src/test/resources/logback.xml diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/pom.xml b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/pom.xml similarity index 92% rename from spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/pom.xml rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/pom.xml index 239be5e134..743684bcd3 100644 --- a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/pom.xml +++ b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - weather-service - weather-service + spring-cloud-zuul-fallback-weather-service + spring-cloud-zuul-fallback-weather-service Weather Service for Zuul Fallback Test diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherController.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherController.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherController.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherController.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplication.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplication.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplication.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/main/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplication.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/main/resources/application.yml b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/main/resources/application.yml similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/main/resources/application.yml rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/main/resources/application.yml diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherControllerIntegrationTest.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherControllerIntegrationTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherControllerIntegrationTest.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherControllerIntegrationTest.java diff --git a/spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplicationIntegrationTest.java b/spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplicationIntegrationTest.java similarity index 100% rename from spring-cloud-modules/spring-cloud-zuul-fallback/weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplicationIntegrationTest.java rename to spring-cloud-modules/spring-cloud-zuul-fallback/spring-cloud-zuul-fallback-weather-service/src/test/java/com/baeldung/spring/cloud/weatherservice/WeatherServiceApplicationIntegrationTest.java diff --git a/spring-security-modules/spring-security-web-angular/pom.xml b/spring-security-modules/spring-security-web-angular/pom.xml index cf23501dff..15dc4d007c 100644 --- a/spring-security-modules/spring-security-web-angular/pom.xml +++ b/spring-security-modules/spring-security-web-angular/pom.xml @@ -15,7 +15,7 @@ - server + spring-security-web-angular-server \ No newline at end of file diff --git a/spring-security-modules/spring-security-web-angular/client/anguarjs/app.js b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/app.js similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/anguarjs/app.js rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/app.js diff --git a/spring-security-modules/spring-security-web-angular/client/anguarjs/home/home.controller.js b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/home/home.controller.js similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/anguarjs/home/home.controller.js rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/home/home.controller.js diff --git a/spring-security-modules/spring-security-web-angular/client/anguarjs/home/home.view.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/home/home.view.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/anguarjs/home/home.view.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/home/home.view.html diff --git a/spring-security-modules/spring-security-web-angular/client/anguarjs/index.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/index.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/anguarjs/index.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/index.html diff --git a/spring-security-modules/spring-security-web-angular/client/anguarjs/login/login.controller.js b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/login/login.controller.js similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/anguarjs/login/login.controller.js rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/login/login.controller.js diff --git a/spring-security-modules/spring-security-web-angular/client/anguarjs/login/login.view.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/login/login.view.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/anguarjs/login/login.view.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/anguarjs/login/login.view.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app.css b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app.css similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app.css rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app.css diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/app.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/app.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/app.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/app.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/app.module.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.module.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/app.module.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.module.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/app.routing.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.routing.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/app.routing.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/app.routing.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/home/home.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/home/home.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/home/home.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/home/home.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/home/home.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/home/home.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/home/home.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/home/home.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/login/login.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/login/login.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/login/login.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/login/login.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/login/login.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/login/login.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/login/login.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/login/login.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/app/main.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/main.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/app/main.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/app/main.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/index.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/index.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/index.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/index.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/package.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/package.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/package.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/package.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/systemjs.config.js b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/systemjs.config.js similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/systemjs.config.js rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/systemjs.config.js diff --git a/spring-security-modules/spring-security-web-angular/client/angular2/tsconfig.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/tsconfig.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular2/tsconfig.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular2/tsconfig.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/.angular-cli.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/.angular-cli.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/.angular-cli.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/.angular-cli.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/package.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/package.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/package.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/package.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.module.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.module.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.module.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.module.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.routing.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.routing.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/app.routing.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/app.routing.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/home/home.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/home/home.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/home/home.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/home/home.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/home/home.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/home/home.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/home/home.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/home/home.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/login/login.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/login/login.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/login/login.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/login/login.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/app/login/login.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/login/login.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/app/login/login.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/app/login/login.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/index.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/index.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/index.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/index.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/main.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/main.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/main.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/main.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/polyfills.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/polyfills.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/polyfills.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/polyfills.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/styles.css b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/styles.css similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/styles.css rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/styles.css diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/src/tsconfig.app.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/tsconfig.app.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/src/tsconfig.app.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/src/tsconfig.app.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/tsconfig.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/tsconfig.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/tsconfig.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/tsconfig.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular4/tslint.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/tslint.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular4/tslint.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular4/tslint.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/.angular-cli.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/.angular-cli.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/.angular-cli.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/.angular-cli.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/package.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/package.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/package.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/package.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.module.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.module.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.module.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.module.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.routing.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.routing.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/app.routing.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/app.routing.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/home/home.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/home/home.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/home/home.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/home/home.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/home/home.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/home/home.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/home/home.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/home/home.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/login/login.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/login/login.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/login/login.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/login/login.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/app/login/login.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/login/login.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/app/login/login.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/app/login/login.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/index.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/index.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/index.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/index.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/main.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/main.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/main.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/main.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/polyfills.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/polyfills.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/polyfills.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/polyfills.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/styles.css b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/styles.css similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/styles.css rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/styles.css diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/src/tsconfig.app.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/tsconfig.app.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/src/tsconfig.app.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/src/tsconfig.app.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/tsconfig.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/tsconfig.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/tsconfig.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/tsconfig.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular5/tslint.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/tslint.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular5/tslint.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular5/tslint.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/angular.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/angular.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/angular.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/angular.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/package.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/package.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/package.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/package.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.module.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.module.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.module.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.module.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.routing.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.routing.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/app.routing.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/app.routing.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/home/home.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/home/home.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/home/home.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/home/home.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/home/home.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/home/home.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/home/home.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/home/home.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/login/login.component.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/login/login.component.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/login/login.component.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/login/login.component.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/app/login/login.component.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/login/login.component.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/app/login/login.component.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/app/login/login.component.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/index.html b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/index.html similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/index.html rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/index.html diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/main.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/main.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/main.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/main.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/polyfills.ts b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/polyfills.ts similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/polyfills.ts rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/polyfills.ts diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/styles.css b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/styles.css similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/styles.css rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/styles.css diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/src/tsconfig.app.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/tsconfig.app.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/src/tsconfig.app.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/src/tsconfig.app.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/tsconfig.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/tsconfig.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/tsconfig.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/tsconfig.json diff --git a/spring-security-modules/spring-security-web-angular/client/angular6/tslint.json b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/tslint.json similarity index 100% rename from spring-security-modules/spring-security-web-angular/client/angular6/tslint.json rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-client/angular6/tslint.json diff --git a/spring-security-modules/spring-security-web-angular/server/pom.xml b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/pom.xml similarity index 95% rename from spring-security-modules/spring-security-web-angular/server/pom.xml rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/pom.xml index a1f4a9f998..c188541bbb 100644 --- a/spring-security-modules/spring-security-web-angular/server/pom.xml +++ b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/pom.xml @@ -3,8 +3,8 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - server - server + spring-security-web-angular-server + spring-security-web-angular-server jar Spring Security Angular diff --git a/spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/SpringBootSecurityApplication.java diff --git a/spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/basicauth/config/BasicAuthConfiguration.java diff --git a/spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/controller/UserController.java diff --git a/spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/java/com/baeldung/springbootsecurityrest/vo/User.java diff --git a/spring-security-modules/spring-security-web-angular/server/src/main/resources/application.properties b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/resources/application.properties similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/main/resources/application.properties rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/resources/application.properties diff --git a/spring-security-modules/spring-security-web-angular/server/src/main/resources/logback.xml b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/resources/logback.xml similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/main/resources/logback.xml rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/main/resources/logback.xml diff --git a/spring-security-modules/spring-security-web-angular/server/src/test/java/com/baeldung/SpringContextTest.java b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/test/java/com/baeldung/SpringContextTest.java similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/test/java/com/baeldung/SpringContextTest.java rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/test/java/com/baeldung/SpringContextTest.java diff --git a/spring-security-modules/spring-security-web-angular/server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java b/spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java similarity index 100% rename from spring-security-modules/spring-security-web-angular/server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java rename to spring-security-modules/spring-security-web-angular/spring-security-web-angular-server/src/test/java/com/baeldung/springbootsecurityrest/BasicAuthConfigurationIntegrationTest.java diff --git a/spring-web-modules/spring-mvc-basics-3/src/main/resources/application.properties b/spring-web-modules/spring-mvc-basics-3/src/main/resources/application.properties index fcdaabe007..708ec5d3dd 100644 --- a/spring-web-modules/spring-mvc-basics-3/src/main/resources/application.properties +++ b/spring-web-modules/spring-mvc-basics-3/src/main/resources/application.properties @@ -5,3 +5,5 @@ spring.thymeleaf.cache=false spring.thymeleaf.enabled=true spring.thymeleaf.prefix=classpath:/templates/ spring.thymeleaf.suffix=.html + +spring.jpa.properties.hibernate.globally_quoted_identifiers=true diff --git a/struts/README.md b/struts/README.md new file mode 100644 index 0000000000..d15b94f662 --- /dev/null +++ b/struts/README.md @@ -0,0 +1,7 @@ +## Struts 2 + +This module contains articles about Struts 2 + +### Relevant articles + +- [A Quick Struts 2 Intro](https://www.baeldung.com/struts-2-intro) diff --git a/struts/WebContent/WEB-INF/web.xml b/struts/WebContent/WEB-INF/web.xml new file mode 100644 index 0000000000..8f1b55943c --- /dev/null +++ b/struts/WebContent/WEB-INF/web.xml @@ -0,0 +1,12 @@ + + + struts + + struts2 + org.apache.struts2.dispatcher.filter.StrutsPrepareAndExecuteFilter + + + struts2 + /* + + \ No newline at end of file diff --git a/struts/WebContent/input.jsp b/struts/WebContent/input.jsp new file mode 100644 index 0000000000..6d80aa3ffd --- /dev/null +++ b/struts/WebContent/input.jsp @@ -0,0 +1,21 @@ +<%@ page language="java" contentType="text/html; charset=ISO-8859-1" + pageEncoding="ISO-8859-1"%> + + + + +Baledung Struts + + +
+

Welcome to Baeldung Struts 2 app

+

Which car do you like !!

+

Please choose ferrari or bmw

+ + +
+ + \ No newline at end of file diff --git a/struts/WebContent/result.jsp b/struts/WebContent/result.jsp new file mode 100644 index 0000000000..0fe9ea2d1d --- /dev/null +++ b/struts/WebContent/result.jsp @@ -0,0 +1,11 @@ +<%@ page contentType="text/html; charset=UTF-8" %> +<%@ taglib prefix="s" uri="/struts-tags" %> + + +Hello World + + +

Hello Baeldung User

+

You are a

+ + diff --git a/struts/pom.xml b/struts/pom.xml new file mode 100644 index 0000000000..a668ea29db --- /dev/null +++ b/struts/pom.xml @@ -0,0 +1,76 @@ + + + 4.0.0 + struts + 0.0.1-SNAPSHOT + struts + pom + + + com.baeldung + parent-spring-4 + 0.0.1-SNAPSHOT + ../parent-spring-4 + + + + + org.apache.struts + struts2-core + ${struts2.version} + + + org.apache.struts + struts2-junit-plugin + ${struts2.version} + + + org.apache.struts + struts2-convention-plugin + ${struts2-convention-plugin.version} + + + javax.servlet + javax.servlet-api + ${javax.servlet-api.version} + + + org.springframework + spring-core + ${spring.version} + + + commons-logging + commons-logging + + + + + + + src/main/java + + + src/main/resources + + + + + maven-war-plugin + ${maven-war-plugin.version} + + WebContent + + + + + + + 2.5.5 + 2.5.8 + 4.3.6.RELEASE + + + \ No newline at end of file diff --git a/struts/src/main/java/com/baeldung/struts/CarAction.java b/struts/src/main/java/com/baeldung/struts/CarAction.java new file mode 100644 index 0000000000..478f3b4cc2 --- /dev/null +++ b/struts/src/main/java/com/baeldung/struts/CarAction.java @@ -0,0 +1,37 @@ +package com.baeldung.struts; + +import org.apache.struts2.convention.annotation.Action; +import org.apache.struts2.convention.annotation.Namespace; +import org.apache.struts2.convention.annotation.Result; + +@Namespace("/tutorial") +@Action("/car") +@Result(name = "success", location = "/result.jsp") +public class CarAction { + private String carName; + private String carMessage; + private CarMessageService carMessageService = new CarMessageService(); + + public String execute() { + System.out.println("inside execute(): carName is" + carName); + this.setCarMessage(this.carMessageService.getMessage(carName)); + return "success"; + } + + public String getCarName() { + return carName; + } + + public void setCarName(String carName) { + this.carName = carName; + } + + public String getCarMessage() { + return carMessage; + } + + public void setCarMessage(String carMessage) { + this.carMessage = carMessage; + } + +} diff --git a/struts/src/main/java/com/baeldung/struts/CarMessageService.java b/struts/src/main/java/com/baeldung/struts/CarMessageService.java new file mode 100644 index 0000000000..34d3ca3d76 --- /dev/null +++ b/struts/src/main/java/com/baeldung/struts/CarMessageService.java @@ -0,0 +1,18 @@ +package com.baeldung.struts; + +public class CarMessageService { + + public String getMessage(String carName) { + System.out.println("inside getMessage()" + carName); + if (carName.equalsIgnoreCase("ferrari")){ + return "Ferrari Fan!"; + } + else if (carName.equalsIgnoreCase("bmw")){ + return "BMW Fan!"; + } + else{ + return "please choose ferrari Or bmw"; + } + } + +} diff --git a/struts/src/main/resources/logback.xml b/struts/src/main/resources/logback.xml new file mode 100644 index 0000000000..7d900d8ea8 --- /dev/null +++ b/struts/src/main/resources/logback.xml @@ -0,0 +1,13 @@ + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + \ No newline at end of file diff --git a/struts/src/test/java/com/baeldung/struts/test/CarActionTest.java b/struts/src/test/java/com/baeldung/struts/test/CarActionTest.java new file mode 100644 index 0000000000..64b640edfb --- /dev/null +++ b/struts/src/test/java/com/baeldung/struts/test/CarActionTest.java @@ -0,0 +1,29 @@ +//package com.baeldung.struts.test; +// +//import org.apache.struts2.StrutsTestCase; +//import org.junit.Test; +// +//import com.baeldung.struts.CarAction; +//import com.opensymphony.xwork2.ActionProxy; +// +//public class CarActionTest extends StrutsTestCase { +// +// public void testgivenCarOptions_WhenferrariSelected_ThenShowMessage() throws Exception { +// request.setParameter("carName", "ferrari"); +// ActionProxy proxy = getActionProxy("/tutorial/car.action"); +// CarAction carAction = (CarAction) proxy.getAction(); +// String result = proxy.execute(); +// assertEquals(result, "success"); +// assertEquals(carAction.getCarMessage(), "Ferrari Fan!"); +// } +// +// public void testgivenCarOptions_WhenbmwSelected_ThenShowMessage() throws Exception { +// request.setParameter("carName", "bmw"); +// ActionProxy proxy = getActionProxy("/tutorial/car.action"); +// CarAction carAction = (CarAction) proxy.getAction(); +// String result = proxy.execute(); +// assertEquals(result, "success"); +// assertEquals(carAction.getCarMessage(), "BMW Fan!"); +// } +// +//} diff --git a/testing-modules/parallel-tests-junit/pom.xml b/testing-modules/parallel-tests-junit/pom.xml index f5a46b91e3..8b1491fd75 100644 --- a/testing-modules/parallel-tests-junit/pom.xml +++ b/testing-modules/parallel-tests-junit/pom.xml @@ -19,5 +19,9 @@ math-test-functions string-test-functions + + + 2.21.0 + \ No newline at end of file diff --git a/vavr-modules/vavr-2/README.md b/vavr-modules/vavr-2/README.md index 71814a08fd..79f415d729 100644 --- a/vavr-modules/vavr-2/README.md +++ b/vavr-modules/vavr-2/README.md @@ -5,4 +5,4 @@ This module contains articles about Vavr. ### Relevant Articles: - [Introduction to Vavr’s Either](https://www.baeldung.com/vavr-either) - [Interoperability Between Java and Vavr](https://www.baeldung.com/java-vavr) -- [[<-- prev]](/vavr) +- [[<-- prev]](/vavr-modules/vavr) diff --git a/vavr-modules/vavr/README.md b/vavr-modules/vavr/README.md index e04e02069f..c288fb6028 100644 --- a/vavr-modules/vavr/README.md +++ b/vavr-modules/vavr/README.md @@ -13,4 +13,4 @@ This module contains articles about Vavr. - [Guide to Collections API in Vavr](https://www.baeldung.com/vavr-collections) - [Collection Factory Methods for Vavr](https://www.baeldung.com/vavr-collection-factory-methods) - [Introduction to Future in Vavr](https://www.baeldung.com/vavr-future) -- [[next -->]](/vavr-2) +- [[next -->]](/vavr-modules/vavr-2) diff --git a/vavr-modules/vavr/src/main/resources/application.properties b/vavr-modules/vavr/src/main/resources/application.properties new file mode 100644 index 0000000000..ead0df89a3 --- /dev/null +++ b/vavr-modules/vavr/src/main/resources/application.properties @@ -0,0 +1 @@ +spring.jpa.properties.hibernate.globally_quoted_identifiers=true